Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Finished project #13

Open
wants to merge 334 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
334 commits
Select commit Hold shift + click to select a range
3139c63
high and low working
Nov 5, 2019
a2b7c07
fixed dice error
Nov 5, 2019
ca62a9c
console improvments
ryan0 Nov 5, 2019
88362de
Merge branch 'dev' of github.com:rond556/Maven.Casino into ryanCraps
ryan0 Nov 5, 2019
c0aaf59
player history added
Nov 5, 2019
7c41917
oops, working in dev
Nov 5, 2019
f8a1252
roulette
Amendoza20 Nov 5, 2019
2e0a841
push
Amendoza20 Nov 5, 2019
efd7092
high and low betting, player balance checker
Nov 5, 2019
90549e5
compilation error
Nov 5, 2019
40f9a26
merge
michkin32 Nov 5, 2019
3c2478c
Merge branch 'dev' of github.com:rond556/Maven.Casino into king
michkin32 Nov 5, 2019
61a4d35
bet added
Nov 5, 2019
51eb503
blackjack sorta playable
michkin32 Nov 5, 2019
38cf076
commiiiiiiiiit
Nov 5, 2019
671ad43
tidus
Nov 5, 2019
c45edce
more high and low gambling
Nov 5, 2019
58cc22d
Merge branch 'dev' of https://github.com/rond556/Maven.Casino into dev
Nov 5, 2019
0ab675a
changeBalanceTypo
Nov 5, 2019
4047312
Craps Betting
ryan0 Nov 5, 2019
2d87b18
Merge branch 'dev' of github.com:rond556/Maven.Casino into dev
ryan0 Nov 5, 2019
46decbd
toyed with music, didn't work
Nov 5, 2019
5cb65b5
changeBalance typos
Nov 5, 2019
3971bbd
Bets
ryan0 Nov 5, 2019
c121ae5
starts snakes test
Nov 5, 2019
92ef364
Merge branch 'dev' of github.com:rond556/Maven.Casino into ryanCraps
ryan0 Nov 5, 2019
4b0b33f
finished up an unpolished version of the Roulette.
Amendoza20 Nov 5, 2019
cdb96d6
Merge branch 'dev' of https://github.com/rond556/Maven.Casino into An…
Amendoza20 Nov 5, 2019
3c86f0b
new push
Amendoza20 Nov 5, 2019
328d536
Merge branch 'dev' of https://github.com/rond556/Maven.Casino into chris
Nov 5, 2019
f836045
Whole lotta Snakes and Ladders tests
Nov 5, 2019
ccc8d70
whole lotta Snakes and Ladders tests
Nov 5, 2019
05c476d
a whole buncha more tests
Nov 5, 2019
5c64e6b
high and low tests
Nov 5, 2019
0df2e3a
merge
michkin32 Nov 5, 2019
3cb83cf
Merge branch 'dev' of https://github.com/rond556/Maven.Casino into chris
Nov 5, 2019
6484dd7
Go fish 'started'
Nov 5, 2019
541be22
Merge branch 'dev' of https://github.com/rond556/Maven.Casino into dev
Nov 5, 2019
6fd629b
added sssssssomething to Snakes and Ladders
Nov 5, 2019
9326604
Added to tblackjack, playable but not correct
michkin32 Nov 5, 2019
b76e2bf
Merge branch 'dev' of github.com:rond556/Maven.Casino into dev
michkin32 Nov 5, 2019
49f052e
Merge branch 'dev' of https://github.com/rond556/Maven.Casino into chris
Nov 5, 2019
4c28d52
Trying to fix roulette
Amendoza20 Nov 5, 2019
db9c4d2
finished snakes and ladders art
Nov 5, 2019
c00e785
Merge branch 'dev' of https://github.com/rond556/Maven.Casino into dev
Nov 5, 2019
9817cd3
fixed roulette
Amendoza20 Nov 6, 2019
4a96a78
fixed merge conflict
Amendoza20 Nov 6, 2019
36c6e9f
important update. Please pull
Nov 6, 2019
80f5383
slow text
ryan0 Nov 6, 2019
1f14b5c
more cosmetics
Nov 6, 2019
0f96997
Merge branch 'dev' of https://github.com/rond556/Maven.Casino into chris
Nov 6, 2019
5a651e5
Slow print/Fast Print
ryan0 Nov 6, 2019
10852a6
fractored language
Nov 6, 2019
77ecb53
updated roulette
Amendoza20 Nov 6, 2019
2290e6f
Merge branch 'dev' of https://github.com/rond556/Maven.Casino into An…
Amendoza20 Nov 6, 2019
5d2a719
merge
ryan0 Nov 6, 2019
60c3c69
Merge branch 'dev' of github.com:rond556/Maven.Casino into ryanCraps
ryan0 Nov 6, 2019
684e48a
Merge branch 'dev' of https://github.com/rond556/Maven.Casino into dev
Amendoza20 Nov 6, 2019
6d50908
Merge branch 'dev' of https://github.com/rond556/Maven.Casino into chris
Nov 6, 2019
5667f81
art refractoring
Nov 6, 2019
e7d4fed
Merge branch 'dev' of https://github.com/rond556/Maven.Casino into dev
Nov 6, 2019
dfe0bfc
more art
Nov 6, 2019
f1ff20c
art finished
Nov 6, 2019
26163c4
refined i/o
ryan0 Nov 6, 2019
0f04b02
Merge branch 'dev' of github.com:rond556/Maven.Casino into ryanCraps
ryan0 Nov 6, 2019
db70b30
finished art...again
Nov 6, 2019
637d28d
created packages
Nov 6, 2019
b340ad6
merge
michkin32 Nov 6, 2019
eecd32a
merge
ryan0 Nov 6, 2019
3d3b6f1
Merge branch 'dev' of github.com:rond556/Maven.Casino into dev
michkin32 Nov 6, 2019
46e5158
pulling to check update
Nov 6, 2019
b7e5973
Merge branch 'dev' of github.com:rond556/Maven.Casino into ryanCraps
ryan0 Nov 6, 2019
719045b
commit to pull
Amendoza20 Nov 6, 2019
3eabb8d
Merge branch 'dev' of https://github.com/rond556/Maven.Casino into An…
Amendoza20 Nov 6, 2019
9c0530f
slot machine
aash-bjw Nov 6, 2019
19f689e
Merge branch 'dev' of https://github.com/rond556/Maven.Casino into abdev
aash-bjw Nov 6, 2019
392a8ea
refactored Snakes and Ladders language
Nov 6, 2019
d5d060f
fix compile error
Nov 6, 2019
5255a71
high and low language refactor
Nov 6, 2019
5db6142
Merge branch 'dev' of github.com:rond556/Maven.Casino into dev
michkin32 Nov 6, 2019
aaab67d
BlackJack is now functional
michkin32 Nov 6, 2019
911695d
pulling updated balck jack
Nov 6, 2019
fde6630
Merge branch 'dev' of https://github.com/rond556/Maven.Casino into chris
Nov 6, 2019
2dcac84
slots check winnings complete
aash-bjw Nov 6, 2019
532efb9
slots art and language update
Nov 6, 2019
ac82922
Merge branch 'ron' into dev
Nov 6, 2019
1bf9487
added blackJack functionality
michkin32 Nov 6, 2019
be79224
Merge branch 'dev' of github.com:rond556/Maven.Casino into dev
michkin32 Nov 6, 2019
40e439f
Merge branch 'dev' of https://github.com/rond556/Maven.Casino into abdev
aash-bjw Nov 6, 2019
3be1ecc
puling from dev
Nov 6, 2019
0e33ca4
Merge branch 'dev' of https://github.com/rond556/Maven.Casino into chris
Nov 6, 2019
68f4d60
Major overhaul to art storage. Please pull
Nov 6, 2019
8124069
Merge branch 'ron' into dev
Nov 6, 2019
6764591
compilation error fix
Nov 6, 2019
e0f8553
understanding enums
Nov 6, 2019
cfe38d2
Merge branch 'dev' of https://github.com/rond556/Maven.Casino into chris
Nov 6, 2019
ac1b9ee
hopefully, this is the last time I'll have to toy with the enums
Nov 6, 2019
1c644ba
Sounds
ryan0 Nov 6, 2019
343ae23
Merge branch 'dev' of github.com:rond556/Maven.Casino into ryanCraps
ryan0 Nov 6, 2019
2d05c6b
finished high and low language
Nov 6, 2019
91dbb21
blackjack properly working but no test
Nov 6, 2019
9371714
Merge branch 'dev' of https://github.com/rond556/Maven.Casino into chris
Nov 6, 2019
b5602f1
slots maybe complete
aash-bjw Nov 6, 2019
405c905
Merge branch 'dev' of https://github.com/rond556/Maven.Casino into abdev
aash-bjw Nov 6, 2019
478e240
Merge branch 'dev' of github.com:rond556/Maven.Casino into dev
ryan0 Nov 6, 2019
35f70a4
Merge branch 'dev' of https://github.com/rond556/Maven.Casino into chris
Nov 6, 2019
4f9318e
fixed approach table buggg
Nov 6, 2019
0a44dc5
more sounds
ryan0 Nov 6, 2019
5794c6e
Merge branch 'ryanCraps' into dev
ryan0 Nov 6, 2019
782c74d
Merge branch 'dev' of github.com:rond556/Maven.Casino into dev
ryan0 Nov 6, 2019
9742fc0
fixed up dice rolls
Nov 6, 2019
f7081ae
finished sounds
Nov 6, 2019
ba6e217
Fixed typo
Amendoza20 Nov 6, 2019
6964da4
fixed merge
Amendoza20 Nov 6, 2019
4a974f7
ladder sound
ryan0 Nov 6, 2019
3aa9138
Merge branch 'dev' of github.com:rond556/Maven.Casino into dev
ryan0 Nov 6, 2019
15e36eb
cleaning up snakes and ladders
Nov 6, 2019
f4c2469
Merge branch 'ron' into dev
Nov 6, 2019
639b1a2
fixed mf slots
aash-bjw Nov 6, 2019
0f4636d
Merge branch 'dev' of https://github.com/rond556/Maven.Casino into abdev
aash-bjw Nov 6, 2019
503f119
commiting
Nov 6, 2019
ed5638d
snakes and ladders update
Nov 6, 2019
935690d
fixed snakes and ladders
Nov 6, 2019
e13ba8a
changes
Nov 6, 2019
7145fc1
Merge branch 'dev' of https://github.com/rond556/Maven.Casino into dev
Nov 6, 2019
82c495e
moved menus
Nov 6, 2019
9c26cd6
Merge branch 'ron' into dev
Nov 6, 2019
f96e89c
fixed compliation error
Nov 6, 2019
d31e7de
You can leave blackjack now
michkin32 Nov 6, 2019
cd35857
fixed merge conflict
michkin32 Nov 6, 2019
e0cc2f2
yo yo yo yo
Nov 6, 2019
f4bfdbc
LLLLLLL
Nov 6, 2019
c152da6
cleaned up snakes and ladders a LOT
Nov 6, 2019
bab38e2
Merge branch 'messingaround' into dev
Nov 6, 2019
99fd096
working high and low flow
Nov 6, 2019
a7d20fd
high and low finished
Nov 7, 2019
709ecbd
high and low totally worrking, clear screen changed
Nov 7, 2019
6f51802
murder free
Nov 7, 2019
093a925
Merge branch 'dev' of https://github.com/rond556/Maven.Casino into dev
Nov 7, 2019
264bf36
start of go fish
ryan0 Nov 7, 2019
dbb6709
merge
ryan0 Nov 7, 2019
98e6203
snakes and ladders testing
Nov 7, 2019
e176025
game history bug worked out
Nov 7, 2019
c49fa35
testing
Nov 7, 2019
dbdbf5b
betting update. PLEASE CHECK YOUR GAMMBLING
Nov 7, 2019
280e2ff
merge commit
michkin32 Nov 7, 2019
bbc55b3
fixied up betting for roulette and slots
Amendoza20 Nov 7, 2019
f91cc55
fixed merge conflict
michkin32 Nov 7, 2019
0c45d19
go fish ui
ryan0 Nov 7, 2019
fc1c1e9
getting to push
Amendoza20 Nov 7, 2019
dbe3f44
merge
ryan0 Nov 7, 2019
8c7ee1f
updated deck and roulette
Amendoza20 Nov 7, 2019
00bfaa5
Merge branch 'AngelDev' into dev
Amendoza20 Nov 7, 2019
2e4e62e
Merge branch 'dev' of https://github.com/rond556/Maven.Casino into dev
Amendoza20 Nov 7, 2019
2ed9c66
high and low testing done
Nov 7, 2019
17da9d7
Merge branch 'ron' into dev
Nov 7, 2019
d9fb5cf
new Go Fish art
Nov 7, 2019
f4035d8
polishing slots and roulette
Amendoza20 Nov 7, 2019
c81110e
Merge branch 'dev' of https://github.com/rond556/Maven.Casino into dev
Amendoza20 Nov 7, 2019
779bfeb
meltdown averted, tests are going up
Nov 7, 2019
2b130ec
working kinda bur commitinf to check an older version to see if it w…
Nov 7, 2019
83fec5b
Merge branch 'dev' of https://github.com/rond556/Maven.Casino into dev
Nov 7, 2019
5517f3b
nevermind...didnt work smdh
Nov 7, 2019
bde3d5b
merging
michkin32 Nov 7, 2019
22d8ba5
tests
Nov 7, 2019
912093a
merging
michkin32 Nov 7, 2019
f86a56b
Merge branch 'dev' of github.com:rond556/Maven.Casino into dev
michkin32 Nov 7, 2019
e268f21
test pieces tests
Nov 7, 2019
dd9d245
Merge branch 'dev' of github.com:rond556/Maven.Casino into dev
michkin32 Nov 7, 2019
d8e9a1f
repository tests done
Nov 7, 2019
5d3cb7a
oops, worked in dev
Nov 7, 2019
744e791
tests fixed
Nov 7, 2019
7148f83
Adding test classes
aash-bjw Nov 7, 2019
ba060c5
tests
aash-bjw Nov 7, 2019
40c15c8
so many tests...
Nov 7, 2019
d4634c2
oops, working in dev
Nov 7, 2019
a56de8a
Fixed blackjack
michkin32 Nov 7, 2019
08cfa10
go fish art
Nov 7, 2019
0f0f2f3
Merge branch 'dev' of github.com:rond556/Maven.Casino into dev
michkin32 Nov 7, 2019
28b5cd4
Merge branch 'dev' of github.com:rond556/Maven.Casino into dev
michkin32 Nov 7, 2019
3a28d20
fixed blackjack
michkin32 Nov 7, 2019
6d2b9ba
we finally have a working black jack
Nov 7, 2019
c602138
we finnally have a working blackJack
Nov 7, 2019
4ef582e
pulling
Nov 7, 2019
ffeef35
pulling
Nov 7, 2019
f2ff0bc
cleaned up merge conflicts in blackJack
Nov 7, 2019
28149a4
Merge branch 'dev' of https://github.com/rond556/Maven.Casino into dev
Nov 7, 2019
6a50ec8
merge confict fixed
Nov 7, 2019
b8fe530
Saving to push
Amendoza20 Nov 7, 2019
3971d7e
tired of this
Nov 7, 2019
ce6b41d
pushing
Amendoza20 Nov 7, 2019
ae7670b
hellllllllo
Nov 7, 2019
3e6111c
commmiitttiiing
Nov 7, 2019
bb76537
go fish working better
ryan0 Nov 7, 2019
36cfda9
Merge branch 'dev' of github.com:rond556/Maven.Casino into ryan
ryan0 Nov 7, 2019
e8901fe
high and low hopefully fixed
Nov 7, 2019
48be438
Merge branch 'ron' into dev
Nov 7, 2019
67c176c
fix cards
ryan0 Nov 7, 2019
f03324b
Merge branch 'ryan' into dev
ryan0 Nov 7, 2019
d8add4a
BlackJack fixed
michkin32 Nov 7, 2019
18f2adb
go fish improvments
ryan0 Nov 7, 2019
f43ddaa
Merge branch 'ryan' into dev
ryan0 Nov 7, 2019
aa750e6
snakes and ladders refractor?
Nov 7, 2019
a51f801
Merge branch 'ron' into dev
Nov 7, 2019
825e1af
oops
Nov 7, 2019
4df6359
blackjack fully functional
michkin32 Nov 7, 2019
2f51e12
Merge branch 'dev' of github.com:rond556/Maven.Casino into dev
michkin32 Nov 7, 2019
d7e15e0
...
Nov 8, 2019
46aa594
checking to get updated blackjack after it has been properly working
Nov 8, 2019
868d433
refactored
Nov 8, 2019
bdfee93
finished tests kinda
Nov 8, 2019
5b83654
killed last bugg
Nov 8, 2019
5b1f489
merge conflict fixed
Nov 8, 2019
c028715
Merge branch 'dev' of https://github.com/rond556/Maven.Casino into dev
Nov 8, 2019
ec785ae
more tests finished
Nov 8, 2019
951bcde
wrapping up testing
Nov 8, 2019
9b9d17c
finished for the night
Nov 8, 2019
3f00013
fixed ai sound effects in snakes
Nov 8, 2019
8a0f7ce
changed card value
Nov 8, 2019
387ac41
Merge branch 'dev' of https://github.com/rond556/Maven.Casino into dev
Nov 8, 2019
c7090a6
merge
michkin32 Nov 8, 2019
fa62c5d
Merge branch 'dev' of github.com:rond556/Maven.Casino into dev
michkin32 Nov 8, 2019
d69bd46
fix go fish end bug
ryan0 Nov 8, 2019
be86411
Merge branch 'dev' of github.com:rond556/Maven.Casino into ryan
ryan0 Nov 8, 2019
48d6cf5
Merge branch 'dev' of https://github.com/rond556/Maven.Casino into abdev
aash-bjw Nov 8, 2019
2d17e80
roulette tests
Amendoza20 Nov 8, 2019
03388bd
Merge branch 'dev' of https://github.com/rond556/Maven.Casino into dev
Amendoza20 Nov 8, 2019
62fe79e
go fish intro
Nov 8, 2019
3bdff8b
Merge branch 'ron' into dev
Nov 8, 2019
29d1d47
tests
ryan0 Nov 8, 2019
1ded95d
done
Nov 8, 2019
616e820
Merge branch 'dev' of github.com:rond556/Maven.Casino into ryan
ryan0 Nov 8, 2019
8649278
last minute fix
michkin32 Nov 8, 2019
0c58372
Tests Passing
aash-bjw Nov 8, 2019
97d71db
Merge branch 'abdev' into dev
aash-bjw Nov 8, 2019
68d9773
Merge branch 'dev' of github.com:rond556/Maven.Casino into dev
michkin32 Nov 8, 2019
96e03b6
pulling working blackjack after nested loop bug
Nov 8, 2019
98d5e91
another high and low test
Nov 8, 2019
5b43831
Merge branch 'ron' into dev
Nov 8, 2019
9c42b02
Tests and go fish history
ryan0 Nov 8, 2019
de246a0
Merge branch 'dev' of github.com:rond556/Maven.Casino into ryan
ryan0 Nov 8, 2019
1734344
one more test. Squeezing
Nov 8, 2019
8b8fabc
Merge branch 'ron' into dev
Nov 8, 2019
fc5b7d2
finished clean code
Nov 8, 2019
f72fdb1
stablized
Nov 8, 2019
873ff97
card now bug fix
ryan0 Nov 8, 2019
7d743e5
Merge branch 'dev' of github.com:rond556/Maven.Casino into dev
ryan0 Nov 8, 2019
c23a414
added pit and $
Nov 8, 2019
aca5ff2
Merge branch 'dev' of https://github.com/rond556/Maven.Casino into dev
Nov 8, 2019
799ba74
finished project
Nov 9, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ local.properties
.settings/
.loadpath
.recommenders
.DS_Store

# External tool builders
.externalToolBuilders/
Expand Down
17 changes: 17 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,18 @@
<groupId>io.zipcoder</groupId>
<artifactId>casino</artifactId>
<version>1.0-SNAPSHOT</version>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>8</source>
<target>8</target>
</configuration>
</plugin>
</plugins>
</build>

<dependencies>
<dependency>
Expand All @@ -15,5 +27,10 @@
<version>4.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>1.4.197</version>
</dependency>
</dependencies>
</project>
Binary file added sounds/dice_roll.wav
Binary file not shown.
Binary file added sounds/ladder.wav
Binary file not shown.
Binary file added sounds/snake_hiss.wav
Binary file not shown.
Binary file added sounds/spend_money.wav
Binary file not shown.
Binary file added sounds/ui_typing.wav
Binary file not shown.
Binary file added sounds/wahwah.wav
Binary file not shown.
Binary file added sounds/win_money.wav
Binary file not shown.
Binary file added sounds/win_sound.wav
Binary file not shown.
8 changes: 0 additions & 8 deletions src/main/java/io/zipcoder/casino/Casino.java

This file was deleted.

10 changes: 10 additions & 0 deletions src/main/java/io/zipcoder/casino/CasinoMain.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package io.zipcoder.casino;

import io.zipcoder.casino.PlayerMenu;

public class CasinoMain {
public static void main(String[] args) {
PlayerMenu playerMenu = new PlayerMenu();
playerMenu.runPlayerMenu();
}
}
33 changes: 33 additions & 0 deletions src/main/java/io/zipcoder/casino/GamePieces/Card.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
package io.zipcoder.casino.GamePieces;

public class Card implements Comparable<Card> {
private Suit suit;
private CardValue cardValue;

public Card (CardValue cardValue, Suit suit){
this.cardValue= cardValue;
this.suit = suit;
}

public Suit getSuit() {
return suit;
}

public void setSuit(Suit suit) {
this.suit = suit;
}

public CardValue getCardValue() {
return cardValue;
}

public void setCardValue(CardValue cardValue) {
this.cardValue = cardValue;

}

@Override
public int compareTo(Card o) {
return Integer.compare(this.cardValue.getValue(), o.cardValue.getValue());
}
}
54 changes: 54 additions & 0 deletions src/main/java/io/zipcoder/casino/GamePieces/CardValue.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
package io.zipcoder.casino.GamePieces;

import java.util.HashMap;
import java.util.Map;

public enum CardValue {

TWO(2),
THREE(3),
FOUR(4),
FIVE(5),
SIX(6),
SEVEN(7),
EIGHT(8),
NINE(9),
TEN(10),
JACK(11),
QUEEN(12),
KING(13),
ACE(14);

private final int value;
private CardValue (int value){
this.value = value;
}

public int getValue() {
return value;
}

public String toString() {
if (value == 14) {
return "ace";
} else if (value == 13) {
return "king";
} else if (value == 12) {
return "queen";
} else if (value == 11) {
return "jack";
} else {
return value + "";
}
}

private static final Map<Integer, CardValue> intToTypeMap = new HashMap<Integer, CardValue>();
static {
for (CardValue type : CardValue.values()) {
intToTypeMap.put(type.value, type);
}
}
public static CardValue fromInt(int i) {
return intToTypeMap.get(i);
}
}
41 changes: 41 additions & 0 deletions src/main/java/io/zipcoder/casino/GamePieces/Deck.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
package io.zipcoder.casino.GamePieces;

import io.zipcoder.casino.utilities.Console;

import java.util.ArrayList;
import java.util.*;

public class Deck {

Console console = new Console(System.in,System.out);
ArrayList<Card> deck = new ArrayList<>();

public Deck(){
this.deck = deck;
for(int i =0; i <= 12; i++){
CardValue value = CardValue.values()[i];
for(int j= 0; j < 4;j++){
Card card= new Card(value, Suit.values()[j]);
this.deck.add(card);
}

}
}

public Integer cardsLeft() {
return deck.size();
}

public void shuffle(){
Collections.shuffle(deck);
}

public Card draw(){


Card drawCard = deck.remove(0);

return drawCard;

}
}
54 changes: 54 additions & 0 deletions src/main/java/io/zipcoder/casino/GamePieces/Dice.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
package io.zipcoder.casino.GamePieces;

import io.zipcoder.casino.utilities.Console;

import java.util.HashMap;
import java.util.Random;

public class Dice {
Console console = new Console(System.in, System.out);

public Integer rollDice(Integer numberOfDice){
Random r = new Random();
Integer sum = 0;
for(int i = 0; i < numberOfDice; i++){
sum += r.nextInt(6) + 1;
}
return sum;
}

public String diceArt(Integer roll){
HashMap<Integer,String> diceMap = new HashMap<>();
diceMap.put(1,"+-----+\n" +
"| |\n" +
"| o |\n" +
"| |\n" +
"+-----+");
diceMap.put(2,"+-----+\n" +
"| o |\n" +
"| |\n" +
"| o |\n" +
"+-----+");
diceMap.put(3,"+-----+\n" +
"| o |\n" +
"| o |\n" +
"| o |\n" +
"+-----+");
diceMap.put(4,"+-----+\n" +
"| o o |\n" +
"| |\n" +
"| o o |\n" +
"+-----+");
diceMap.put(5,"+-----+\n" +
"| o o |\n" +
"| o |\n" +
"| o o |\n" +
"+-----+");
diceMap.put(6,"+-----+\n" +
"| o o |\n" +
"| o o |\n" +
"| o o |\n" +
"+-----+");
return diceMap.get(roll);
}
}
12 changes: 12 additions & 0 deletions src/main/java/io/zipcoder/casino/GamePieces/RouletteSpinner.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package io.zipcoder.casino.GamePieces;

import java.util.Random;

public class RouletteSpinner {
private static Random random = new Random();

public static Integer winningNumber() {
return random.nextInt(37);
}

}
37 changes: 37 additions & 0 deletions src/main/java/io/zipcoder/casino/GamePieces/SlotMachine.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
package io.zipcoder.casino.GamePieces;

import io.zipcoder.casino.Games.GamblingGame;
import io.zipcoder.casino.utilities.Console;

import java.util.Random;
import java.util.Arrays;

public class SlotMachine {

Console console = new Console(System.in, System.out);

Integer[][] slotMachine = new Integer[3][3];

public SlotMachine(Integer[][] slot){
this.slotMachine = slot;
}

public static Integer randNum(){
Random random = new Random();
Integer randInt = random.nextInt(10);
return randInt;
}


public Integer[][] createMachine() {
for (int i = 0; i < slotMachine.length; i++){
for(int j = 0; j < slotMachine.length; j++){
slotMachine[i][j] = randNum();
}
} return slotMachine;
}

public void printSlots(){
console.println(slotMachine.toString());
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package io.zipcoder.casino.GamePieces;

public class SnakesLaddersPiece {
private Integer currentPosition = 0;

public Integer getCurrentPosition() {
return currentPosition;
}

public void setCurrentPosition(Integer currentPosition) {
this.currentPosition = currentPosition;
}
}
9 changes: 9 additions & 0 deletions src/main/java/io/zipcoder/casino/GamePieces/Suit.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package io.zipcoder.casino.GamePieces;

public enum Suit {

HEARTS,
SPADES,
CLUBS,
DIAMONDS;
}
Loading