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

Dev #12

Open
wants to merge 359 commits into
base: master
Choose a base branch
from
Open

Dev #12

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
359 commits
Select commit Hold shift + click to select a range
714938c
minor changes
Nov 5, 2019
e25be3f
getting the latest
Nov 5, 2019
83fe952
commented out cardhand
MannyMonocle Nov 5, 2019
b934d87
rolling
MannyMonocle Nov 5, 2019
67bc51f
Merge pull request #27 from jeanvalentin51/player
jeanvalentin51 Nov 5, 2019
ba38299
latest
Nov 5, 2019
5f26213
cardhand public
MannyMonocle Nov 5, 2019
e6d0f46
Update
MikeGray31 Nov 5, 2019
5668230
Merge branch 'dev' into yatzee
MikeGray31 Nov 5, 2019
7b39f44
gofish changes
mikescho1 Nov 5, 2019
2d1fd7a
refine
Nov 5, 2019
1cae171
Merge pull request #28 from jeanvalentin51/console
jeanvalentin51 Nov 5, 2019
c7fb0cc
pulling from dev
mikescho1 Nov 5, 2019
26e3007
oh yea
MannyMonocle Nov 5, 2019
6f6b2e1
Added DiceRolleTest
MikeGray31 Nov 5, 2019
e61dda3
Merge branch 'dev' into yatzee
MikeGray31 Nov 5, 2019
d6843de
Updating Yahtzee
MikeGray31 Nov 5, 2019
4de9894
saved gofish
mikescho1 Nov 5, 2019
0559bf3
Added DiceRollTests and other Updates
MikeGray31 Nov 5, 2019
cdc35e0
Merge pull request #29 from jeanvalentin51/gofish
mikescho1 Nov 5, 2019
60bb62d
Changes to craps
Nov 5, 2019
cc4c1f1
Merge branch 'dev' into craps
Nov 5, 2019
d830c7a
Merge branch 'dev' into gofish
Nov 5, 2019
f18aa79
teamwork = dreamwork
MannyMonocle Nov 5, 2019
83ce6c1
Merge branch 'dev' into yatzee
jeanvalentin51 Nov 5, 2019
ad467ea
Merge pull request #30 from jeanvalentin51/yatzee
jeanvalentin51 Nov 5, 2019
490e89a
dice things
MannyMonocle Nov 5, 2019
5d0e1a8
Bug fixes for Yahtzee Class and more DiceRollTests
MikeGray31 Nov 5, 2019
1dc4db1
worked w/ Mike
MannyMonocle Nov 5, 2019
c971a14
Merge pull request #31 from jeanvalentin51/player
jeanvalentin51 Nov 5, 2019
990121b
Quality improvement to the display in Yahtzee
MikeGray31 Nov 5, 2019
7b443f0
Merge branch 'dev' into yatzee
MikeGray31 Nov 5, 2019
7891f0c
craps update
Nov 5, 2019
522cede
Merge branch 'dev' into craps
Nov 5, 2019
550f23b
minor tweaks
MannyMonocle Nov 5, 2019
1c3c903
added numerous methods for blackjack
mikescho1 Nov 5, 2019
00bb03e
changes on go fish
Nov 5, 2019
46f13c8
Merge branch 'dev' into gofish
Nov 5, 2019
542cc43
fixed conflicts
mikescho1 Nov 5, 2019
4922b37
Merge pull request #32 from jeanvalentin51/craps
jeanvalentin51 Nov 5, 2019
55a6c4a
new changes on go fish
Nov 5, 2019
d7393b4
Merge branch 'dev' into gofish
Nov 5, 2019
8c4fd69
add argument
Nov 5, 2019
5ae3075
Merge pull request #33 from jeanvalentin51/console
jeanvalentin51 Nov 5, 2019
fcdb732
player wageGood added
MannyMonocle Nov 6, 2019
bd27c5a
7pm
MannyMonocle Nov 6, 2019
bac983c
Merge pull request #34 from jeanvalentin51/player
jeanvalentin51 Nov 6, 2019
c3bec3f
Update
MikeGray31 Nov 6, 2019
8f29bd0
Merge branch 'dev' into yatzee
MikeGray31 Nov 6, 2019
89e34b1
Merge branch 'dev' into gofish
Nov 6, 2019
b270ab1
add bj caluclator with alumni ben
mikescho1 Nov 6, 2019
6aec12e
Merge pull request #35 from jeanvalentin51/gofish
jeanvalentin51 Nov 6, 2019
e61e58d
undid changesclear
MannyMonocle Nov 6, 2019
fcc96bf
uhhh
MannyMonocle Nov 6, 2019
af89085
7:21pm
MannyMonocle Nov 6, 2019
ba85163
Merge pull request #36 from jeanvalentin51/player
jeanvalentin51 Nov 6, 2019
e717305
minor changes to hand calculator
mikescho1 Nov 6, 2019
5e391f4
pulling changes from dev
mikescho1 Nov 6, 2019
e353ada
changes on go fish
Nov 6, 2019
d6e6b3d
Merge branch 'dev' into gofish
Nov 6, 2019
232275d
Merge pull request #37 from jeanvalentin51/gofish
jeanvalentin51 Nov 6, 2019
a78910e
no major changes
mikescho1 Nov 6, 2019
6493b33
started on check for ace methds
mikescho1 Nov 6, 2019
22dac4c
9am
MannyMonocle Nov 6, 2019
edbcf68
Merge branch 'dev' into player
MannyMonocle Nov 6, 2019
d0322cd
privated and protected some stuff
MannyMonocle Nov 6, 2019
a0bb4f0
Merge pull request #38 from jeanvalentin51/player
jeanvalentin51 Nov 6, 2019
f5c939f
Fixed error coming from switch statements
MikeGray31 Nov 6, 2019
25f0da7
Merge branch 'dev' into yatzee
MikeGray31 Nov 6, 2019
5f06bec
craps
Nov 6, 2019
1921a0c
changes to craps
Nov 6, 2019
c6db04a
changes to checkforacesmethod
mikescho1 Nov 6, 2019
8d6afc6
Merge branch 'dev' into blackjack
jeanvalentin51 Nov 6, 2019
a4f3b6e
Merge pull request #39 from jeanvalentin51/blackjack
jeanvalentin51 Nov 6, 2019
58ddfd3
to pull
MannyMonocle Nov 6, 2019
4944e3d
Merge branch 'dev' into craps
Nov 6, 2019
8648985
Merge branch 'dev' into player
MannyMonocle Nov 6, 2019
00af9ee
refine user experience
Nov 6, 2019
581427f
More bug fixes for Yahtzee
MikeGray31 Nov 6, 2019
6274f9b
Merge branch 'dev' into yatzee
MikeGray31 Nov 6, 2019
bb9d1e7
Merge branch 'dev' into console
Nov 6, 2019
b03cc08
finished completing ace value logic
mikescho1 Nov 6, 2019
c8dde94
Merge branch 'blackjack' of https://github.com/jeanvalentin51/Maven.C…
mikescho1 Nov 6, 2019
4fb14c9
Merge pull request #40 from jeanvalentin51/console
jeanvalentin51 Nov 6, 2019
833ff02
pulling most recent dev
mikescho1 Nov 6, 2019
f77ef8b
Merge pull request #41 from jeanvalentin51/blackjack
jeanvalentin51 Nov 6, 2019
9c0fb83
Add test for deal cards
Nov 6, 2019
721209a
craps almost done
Nov 6, 2019
a731aa9
Merge branch 'dev' into craps
Nov 6, 2019
174d7c9
Add test for shuffle deck
Nov 6, 2019
072ecaa
Merge pull request #42 from jeanvalentin51/craps
jeanvalentin51 Nov 6, 2019
bce0833
minor tweaks
MannyMonocle Nov 6, 2019
bd3afa0
Merge branch 'dev' into player
MannyMonocle Nov 6, 2019
0e88727
Updated Yahtzee Evalution methods and Tests to be more concise
MikeGray31 Nov 6, 2019
c547d66
Merge branch 'dev' into yatzee
MikeGray31 Nov 6, 2019
a01c4fa
Updated Yahtzee Tests to have private fields
MikeGray31 Nov 6, 2019
53da7b9
more changes on go fish
Nov 6, 2019
ad7f500
Add logic to test draw card
Nov 6, 2019
79e18ed
Merge branch 'dev' into console
Nov 6, 2019
9b353c9
GoFish
Nov 6, 2019
6b3160b
Merge branch 'dev' into gofish
Nov 6, 2019
5b6d8c8
Merge pull request #44 from jeanvalentin51/gofish
jeanvalentin51 Nov 6, 2019
9b8fdd5
pushing minor changes in order to pull from dev
mikescho1 Nov 6, 2019
b79a831
Updated Yahtzee
MikeGray31 Nov 6, 2019
48a6a50
Updated Yahtzee
MikeGray31 Nov 6, 2019
672c24f
Merge branch 'dev' into yatzee
MikeGray31 Nov 6, 2019
c46a85d
fix cardHand
Nov 6, 2019
9b143b4
Merge pull request #45 from jeanvalentin51/yatzee
jeanvalentin51 Nov 6, 2019
f4aeac0
Merge pull request #46 from jeanvalentin51/gofish
jeanvalentin51 Nov 6, 2019
10707e0
minor changes to pull from dev
mikescho1 Nov 6, 2019
3e3e7e9
pulling changes to cardhand from dev
mikescho1 Nov 6, 2019
4dd9d93
Cleaned up the code
Nov 6, 2019
4ecd444
fix conflict
Nov 6, 2019
7994646
Merge pull request #43 from jeanvalentin51/console
jeanvalentin51 Nov 6, 2019
fb0e6f7
Add logic/test to add money
Nov 6, 2019
436eb4c
Merge pull request #47 from jeanvalentin51/console
jeanvalentin51 Nov 6, 2019
ebf67ea
minor
Nov 6, 2019
8a28ec7
Merge pull request #48 from jeanvalentin51/console
jeanvalentin51 Nov 6, 2019
c522801
update
MikeGray31 Nov 6, 2019
d7c301e
Merge branch 'dev' into yatzee
MikeGray31 Nov 6, 2019
768ff55
Add test for card hand
Nov 6, 2019
916edfe
Add test for display hand
Nov 6, 2019
c652490
Merge branch 'dev' into console
Nov 6, 2019
61de8f8
Merge pull request #49 from jeanvalentin51/console
jeanvalentin51 Nov 6, 2019
70b3d68
Merge branch 'dev' into yatzee
MikeGray31 Nov 6, 2019
c197850
beautify
Nov 6, 2019
15c7afc
all that jazz
mikescho1 Nov 6, 2019
5893fa8
Merge pull request #50 from jeanvalentin51/console
jeanvalentin51 Nov 6, 2019
0bbfaa4
gettin jazz
mikescho1 Nov 6, 2019
a639414
trying to resolve merge conflict
MannyMonocle Nov 6, 2019
8108193
fixed conflict
MannyMonocle Nov 6, 2019
b5439f4
jazz
Nov 6, 2019
acfb1c9
Merge branch 'dev' into console
Nov 6, 2019
8dacda1
Merge pull request #51 from jeanvalentin51/console
jeanvalentin51 Nov 6, 2019
9656086
blank yatzee
MannyMonocle Nov 6, 2019
a0ee5ad
fixed stuff
MannyMonocle Nov 6, 2019
0067db9
nuked repo
MannyMonocle Nov 6, 2019
499f0fc
idk what's going on
MannyMonocle Nov 6, 2019
121f26e
more user friendly stuff
Nov 6, 2019
1f1b215
Merge pull request #52 from jeanvalentin51/console
jeanvalentin51 Nov 6, 2019
1f7e608
Added dice art
MikeGray31 Nov 6, 2019
ea08c4f
Merge branch 'dev' into yatzee
MikeGray31 Nov 6, 2019
c60196e
Update
MikeGray31 Nov 6, 2019
3eebbef
Update
MikeGray31 Nov 6, 2019
3a22346
added get balance method
MannyMonocle Nov 6, 2019
32a26bd
Merge branch 'dev' of https://github.com/jeanvalentin51/Maven.Casino …
MannyMonocle Nov 6, 2019
b43cc8f
Merge branch 'dev' into player
MannyMonocle Nov 6, 2019
237c47b
Merge pull request #53 from jeanvalentin51/player
jeanvalentin51 Nov 6, 2019
29acd0e
update
MikeGray31 Nov 6, 2019
84ba82c
Merge pull request #54 from jeanvalentin51/yatzee
jeanvalentin51 Nov 6, 2019
5d3a89d
console craps update
Nov 6, 2019
fc022f5
Merge branch 'dev' into craps
Nov 6, 2019
3b8e1b6
changes diaplay go fish
Nov 6, 2019
f181eec
fixes
Nov 6, 2019
aaaa27a
working on calculate hand methods
mikescho1 Nov 6, 2019
62f7331
Merge pull request #55 from jeanvalentin51/gofish
jeanvalentin51 Nov 6, 2019
ae1847a
Craps is Done
Nov 6, 2019
7dac0aa
Merge branch 'dev' into craps
Nov 6, 2019
dc31a7c
Merge pull request #56 from jeanvalentin51/craps
jeanvalentin51 Nov 6, 2019
ec9e88b
fix menu for craps
Nov 6, 2019
a161f6c
Merge pull request #57 from jeanvalentin51/console
jeanvalentin51 Nov 6, 2019
ffcbc30
Updated ASCII art for Yahtzee Class
MikeGray31 Nov 6, 2019
5096d37
Merge branch 'dev' into yatzee
MikeGray31 Nov 6, 2019
489fd3b
Updated ASCII art for Yahtzee Class
MikeGray31 Nov 6, 2019
ec1e367
go fish almost finished
Nov 6, 2019
101893f
fixed merge
Nov 6, 2019
a0c25b4
Merge pull request #58 from jeanvalentin51/gofish
jeanvalentin51 Nov 6, 2019
b4c7bac
jazz
Nov 6, 2019
cfad257
Merge pull request #59 from jeanvalentin51/console
jeanvalentin51 Nov 6, 2019
eb79d69
Updated ASCII art for Yatzee Class
MikeGray31 Nov 7, 2019
49e3f2a
Merge branch 'dev' into yatzee
MikeGray31 Nov 7, 2019
9c86085
Add test for have card
Nov 7, 2019
c719cee
Updated ASCII art for Yatzee Class
MikeGray31 Nov 7, 2019
baaada1
More ASCII art updates for Yahtzee and added resetGame() method
MikeGray31 Nov 7, 2019
14329ee
Merge pull request #60 from jeanvalentin51/yatzee
jeanvalentin51 Nov 7, 2019
0f013b9
Add test for trade cards
Nov 7, 2019
d529e41
update
MikeGray31 Nov 7, 2019
36a4fe2
Merge branch 'dev' into yatzee
MikeGray31 Nov 7, 2019
5abc6ed
update
MikeGray31 Nov 7, 2019
dd46732
lots of stuff. who know what
mikescho1 Nov 7, 2019
0cf4570
Add test for fish for card
Nov 7, 2019
3411443
Merge branch 'dev' into console
Nov 7, 2019
f79cc25
Merge pull request #61 from jeanvalentin51/console
jeanvalentin51 Nov 7, 2019
07d48fb
Add test for check winner
Nov 7, 2019
fa7d218
Created YahtzeeDiceTest and ScoreAndSettingsTest classes
MikeGray31 Nov 7, 2019
ef5b273
Merge branch 'dev' into yatzee
MikeGray31 Nov 7, 2019
e25ee4c
Add test for get comp card
Nov 7, 2019
e8a89d6
Merge branch 'dev' into console
Nov 7, 2019
a7555d1
Merge pull request #62 from jeanvalentin51/console
jeanvalentin51 Nov 7, 2019
0b03357
Merge branch 'dev' into blackjack
jeanvalentin51 Nov 7, 2019
438ba26
Merge pull request #63 from jeanvalentin51/blackjack
jeanvalentin51 Nov 7, 2019
d676633
Clear the screen more
Nov 7, 2019
83a4c19
Merge pull request #64 from jeanvalentin51/console
jeanvalentin51 Nov 7, 2019
77b492c
clean up
MannyMonocle Nov 7, 2019
922f616
small changes, jazzie changes
Nov 7, 2019
1ec0a6f
lower case for Valentin
Nov 7, 2019
863fef9
Merge branch 'dev' of https://github.com/jeanvalentin51/Maven.Casino …
Nov 7, 2019
7633335
go fish
Nov 7, 2019
eb814c4
Merge pull request #65 from jeanvalentin51/gofish
jeanvalentin51 Nov 7, 2019
9a67374
Merge pull request #66 from jeanvalentin51/yatzee
jeanvalentin51 Nov 7, 2019
31bbf08
Merge branch 'dev' into player
MannyMonocle Nov 7, 2019
d6a200f
added resetpot
MannyMonocle Nov 7, 2019
c9999c6
stuff
MannyMonocle Nov 7, 2019
b572866
Merge pull request #67 from jeanvalentin51/player
jeanvalentin51 Nov 7, 2019
b892085
finished go fish
Nov 7, 2019
196b5b6
Merge branch 'dev' into gofish
Nov 7, 2019
b6e8690
Merge pull request #68 from jeanvalentin51/gofish
jeanvalentin51 Nov 7, 2019
3885c0f
console fixed
MannyMonocle Nov 7, 2019
1814a47
more string changes
MannyMonocle Nov 7, 2019
1e77452
Merge branch 'dev' into player
MannyMonocle Nov 7, 2019
e68419c
checkForChips added
MannyMonocle Nov 7, 2019
98d93a2
working on bj
Nov 7, 2019
cab7b40
Merge branch 'dev' into console
Nov 7, 2019
b08840c
Merge pull request #69 from jeanvalentin51/player
jeanvalentin51 Nov 7, 2019
5d3e3c2
Merge branch 'dev' into console
Nov 7, 2019
05efd1c
logic added
MannyMonocle Nov 7, 2019
5da2371
more logic
Nov 7, 2019
f6b8280
Merge branch 'dev' into player
MannyMonocle Nov 7, 2019
64e8edf
cleanup
MannyMonocle Nov 7, 2019
d1d1bf9
Merge branch 'dev' into yatzee
MikeGray31 Nov 7, 2019
4189c51
not crashing but need more logic
Nov 8, 2019
e17687e
Merge pull request #70 from jeanvalentin51/console
jeanvalentin51 Nov 8, 2019
6be5668
craps tests added
MannyMonocle Nov 8, 2019
a1f4251
merge conflict fixed
MannyMonocle Nov 8, 2019
e94d6b4
Merge pull request #71 from jeanvalentin51/player
jeanvalentin51 Nov 8, 2019
204b253
Merge branch 'dev' into yatzee
MikeGray31 Nov 8, 2019
5b083c4
fri 9am
MannyMonocle Nov 8, 2019
1f12f83
Merge branch 'dev' into player
MannyMonocle Nov 8, 2019
dc23ede
repaired craps
MannyMonocle Nov 8, 2019
e338f26
fixed tests
Nov 8, 2019
8c2a09b
Merge pull request #72 from jeanvalentin51/console
jeanvalentin51 Nov 8, 2019
0549185
CardHand test fixed
Nov 8, 2019
8cde383
erge conflicts
Nov 8, 2019
019d930
Merge pull request #73 from jeanvalentin51/gofish
jeanvalentin51 Nov 8, 2019
61e7519
Merge branch 'dev' into player
MannyMonocle Nov 8, 2019
ad1fe61
beautify
Nov 8, 2019
16ca9d1
Merge pull request #74 from jeanvalentin51/console
jeanvalentin51 Nov 8, 2019
78e658e
Merge pull request #75 from jeanvalentin51/player
jeanvalentin51 Nov 8, 2019
a56081c
final merge
MannyMonocle Nov 8, 2019
c4efbbb
Working on Blackjack
MikeGray31 Nov 8, 2019
6156876
Merge branch 'dev' into player
MannyMonocle Nov 8, 2019
3e500bd
Merge branch 'dev' into yatzee
MikeGray31 Nov 8, 2019
b6e2ddf
Merge pull request #76 from jeanvalentin51/player
jeanvalentin51 Nov 8, 2019
47fb2fa
remove test for user input
Nov 8, 2019
f9c31f2
Merge pull request #77 from jeanvalentin51/console
jeanvalentin51 Nov 8, 2019
710a89f
s
Nov 8, 2019
8ed1363
Merge pull request #78 from jeanvalentin51/gofish
jeanvalentin51 Nov 8, 2019
828528a
Updated Blackjack
MikeGray31 Nov 8, 2019
735082b
Merge branch 'dev' into yatzee
MikeGray31 Nov 8, 2019
da1b5ea
Merge pull request #79 from jeanvalentin51/yatzee
jeanvalentin51 Nov 8, 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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -104,3 +104,6 @@ target/*
.project
.classpath
.settings


*DS_Store
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
## Minimum Viable Product (MVP)
* Your application must have at the very least 4 games:
* Go Fish a card game
* BlackJack a card game
* io.zipcoder.casino.CardGames.BlackJack a card game
* Craps a dice game
* An additional dice game

Expand All @@ -25,7 +25,7 @@

## Developmental Notes
* `GoFish` is a friendly game and should not involve gambling.
* `BlackJack` and `GoFish` are both card games and should therefore inherit from a common `CardGame`.
* Any common logic or fields between the games should live CardGame class, **not** BlackJack **nor** GoFish.
* `io.zipcoder.casino.CardGames.BlackJack` and `GoFish` are both card games and should therefore inherit from a common `CardGame`.
* Any common logic or fields between the games should live CardGame class, **not** io.zipcoder.casino.CardGames.BlackJack **nor** GoFish.
* You must have a completed and approved UML diagram before you proceed to do any development
* All public methods should be tested.
171 changes: 171 additions & 0 deletions src/main/java/io/zipcoder/casino/App.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,171 @@
package io.zipcoder.casino;

import io.zipcoder.casino.CardGames.BlackJack;
import io.zipcoder.casino.CardGames.GoFish;
import io.zipcoder.casino.DiceGames.Craps;
import io.zipcoder.casino.DiceGames.Yahtzee;
import io.zipcoder.casino.Player.Player;
import io.zipcoder.casino.Player.PlayerWarehouse;
import io.zipcoder.casino.utilities.Console;

import java.util.concurrent.TimeUnit;

public class App {

private Console menu;
private String userId = "";
private String userPassword = "";
private Player newPlayer;
private PlayerWarehouse warehouse = new PlayerWarehouse();
private int counter = 0;

public void App (){

this.menu = new Console(System.in,System.out);
this.menu.printWelcome();
consolePrintDelay(1000);
mainMenu(); // log in ...

}


private void mainMenu(){
int userInput;
userInput = this.menu.printMainMenu();
mainMenuActions(userInput);
}

private void mainMenuActions(Integer userSelection){

switch (userSelection) {
case 1:
// Log in
if (authenticatePlayer()) {
this.menu.print("Logging in .");
consolePrintDelay(500);
this.menu.print(".");
consolePrintDelay(500);
this.menu.print(".\n\n");
consolePrintDelay(500);

selectGameToPlay();
} else {
this.menu.print("We could not find this user. Please try again!\n\n");
consolePrintDelay(500);
counter++;
this.userId = "";
this.userPassword = "";
if ((counter > 1)) {
counter = 0;
this.menu.print("You exceeded the allowed number of tries!\n\n");
mainMenu();
} else {
mainMenuActions(userSelection);
}
}
break;
case 2:
// Create new account
consolePrintDelay(500);
this.menu.println("Creating new account ...\n");
if (authenticatePlayer()){
this.menu.println("This user already exists, please log in.\n");
consolePrintDelay(1000);
mainMenu();
} else {
createPlayer();
selectGameToPlay();
}
break;

case 3:
// Exit
this.menu.print("Have a great day!");
System.exit(0);
break;

default:
this.menu.print("Error! Please enter another option!\n\n");
consolePrintDelay(1000);
mainMenu();

} // main menu actions

} // menuActions

private void selectGameToPlay() {
int userInput;
consolePrintDelay(500);
this.menu.println("You are now logged in - enjoy the ride!\n");
userInput = this.menu.printSelectGame();

selectGameToPlayActions(userInput);
} // select game

private void selectGameToPlayActions(Integer gameSelected){
consolePrintDelay(1000);
this.menu.clearScreen();
this.menu.printGameName(gameSelected);
consolePrintDelay(1000);
switch (gameSelected){
case 1:
GoFish newGoFish = new GoFish(this.newPlayer);
newGoFish.startGame();
break;
case 2:
Yahtzee newYahtzee = new Yahtzee(this.newPlayer);
newYahtzee.startGame();
break;
case 3:
BlackJack newBlackJack = new BlackJack(this.newPlayer);
addMoneyToPlayer();
newBlackJack.startGame();
break;
case 4:
Craps newCraps = new Craps(this.newPlayer);
addMoneyToPlayer();
newCraps.startGame();
break;
case 5:
mainMenu();
break;
default:
this.menu.print("Error! Invalid Selection!\n\n");
break;
}

selectGameToPlay();


} // game actions


private Boolean authenticatePlayer(){
consolePrintDelay(1000);
this.userId = this.menu.getStringInput("Enter your ID:");
this.userPassword = this.menu.getStringInput("Enter your password:");

this.newPlayer = this.warehouse.getPlayer(this.userId+this.userPassword);
return this.newPlayer != null;
}

private void createPlayer(){
this.warehouse.addPlayer(this.userId,this.userPassword);
this.newPlayer = warehouse.getPlayer(this.userId+this.userPassword);
}

private void consolePrintDelay (int miliSeconds){
try {
TimeUnit.MILLISECONDS.sleep(miliSeconds);
} catch (InterruptedException e){
System.out.println(e.getMessage());
}
}

private void addMoneyToPlayer (){
double amount;
amount = this.menu.getDoubleInput("How much money would you like to add to your account?");
this.newPlayer.addAmount(amount);
}

} // class
Loading