Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
224 commits
Select commit Hold shift + click to select a range
b747399
game interface added
Feb 21, 2018
b70a475
Merge pull request #1 from EricBarnaba/master
ktecle Feb 21, 2018
24b8c3a
created Console and ConsoleTest classes
Feb 21, 2018
269f343
Merge pull request #2 from vvg3/master
ktecle Feb 21, 2018
2402424
added House & Profile
Feb 21, 2018
8ebc4bd
Merge pull request #3 from JWURD/master
ktecle Feb 21, 2018
ae2bbf1
first commit
Feb 21, 2018
37fc670
added Player
Feb 21, 2018
3c83304
Merge pull request #4 from JWURD/master
ktecle Feb 21, 2018
214b215
added Craps Player
Feb 21, 2018
aafebe2
Merge pull request #5 from JWURD/master
ktecle Feb 21, 2018
49a8546
added BlackJackPlayer and BlackJackGame classes and test classes
Feb 21, 2018
9c39897
Merge pull request #6 from vvg3/master
ktecle Feb 21, 2018
a49e1f6
added Dice dice game and craps game
Feb 21, 2018
5a34cd6
Merge pull request #7 from JWURD/master
ktecle Feb 21, 2018
26e3671
update
Feb 21, 2018
8899cec
created enums for CardRank and CardSuit
Feb 21, 2018
77ab525
update
Feb 21, 2018
e9bfbcd
Merge pull request #8 from vvg3/master
ktecle Feb 21, 2018
b1b5041
not sure
Feb 21, 2018
36713af
updates...
Feb 21, 2018
057c6db
added a Card
Feb 21, 2018
deae1b1
Merge pull request #10 from vvg3/master
ktecle Feb 21, 2018
570ea41
Merge pull request #9 from JWURD/master
ktecle Feb 21, 2018
bd83a0d
added Deck
Feb 21, 2018
583b346
update
Feb 21, 2018
048efd2
Merge pull request #11 from JWURD/master
ktecle Feb 21, 2018
a75c6be
update
Feb 21, 2018
c10f90d
add default constructor to player
Feb 21, 2018
def8fd2
vg
Feb 21, 2018
c50e4e7
made constructor call super class player
Feb 21, 2018
3f7df13
changed constructor to call super class player
Feb 21, 2018
cf908bc
Merge pull request #12 from JWURD/master
ktecle Feb 21, 2018
3b9d09e
update
Feb 21, 2018
cdf57db
Merge branch 'master' of https://github.com/ktecle/CR-MacroLabs-OOP-C…
Feb 21, 2018
a2ba654
update
Feb 21, 2018
7519207
updated BlackJackGame
Feb 21, 2018
cfc1ed8
UML Diagram
EricBarnaba Feb 21, 2018
4ac3119
added BlackJack test
Feb 21, 2018
dd5e505
Merge pull request #13 from vvg3/master
ktecle Feb 21, 2018
d7ec14f
Merge branch 'master' of https://github.com/EricBarnaba/CR-MacroLabs-…
Feb 22, 2018
57cc796
Merge branch 'master' of https://github.com/ktecle/CR-MacroLabs-OOP-C…
Feb 22, 2018
b07bd81
Added Casino UML
EricBarnaba Feb 22, 2018
31dab81
Merge branch 'master' of https://github.com/EricBarnaba/CR-MacroLabs-…
Feb 22, 2018
d9eb707
Merge pull request #14 from EricBarnaba/master
ktecle Feb 22, 2018
73dc239
Added Updated UML
EricBarnaba Feb 22, 2018
621c247
Delete Untitled Diagram.xml
EricBarnaba Feb 22, 2018
8158996
Delete Casino UML
EricBarnaba Feb 22, 2018
164cae0
Merge pull request #15 from EricBarnaba/master
ktecle Feb 22, 2018
92fffad
Commit
Feb 22, 2018
63f8ce2
test package update
Feb 22, 2018
ec9aee4
Merge pull request #16 from vvg3/master
ktecle Feb 22, 2018
5950404
commit
Feb 22, 2018
3140450
cleaning for pull
Feb 22, 2018
997937e
she builds baby
Feb 22, 2018
52c67f3
Merge pull request #17 from EricBarnaba/master
ktecle Feb 22, 2018
fb9633a
commit
Feb 22, 2018
c3955fe
saving
Feb 22, 2018
b3b99a1
syncing up
Feb 22, 2018
c8f6628
Merge pull request #18 from EricBarnaba/master
ktecle Feb 22, 2018
d484d19
updated deck, card, rank and suit
Feb 22, 2018
94c8e19
Player Profile testest working on house
Feb 22, 2018
c17ec41
Merge pull request #19 from vvg3/master
ktecle Feb 22, 2018
1d52ff4
Merge pull request #20 from JWURD/master
ktecle Feb 22, 2018
ff3e16f
deck updates
Feb 22, 2018
19cccaf
Merge pull request #21 from vvg3/master
ktecle Feb 22, 2018
3a2a54c
getProfile and CreateProfile updated
Feb 22, 2018
535b340
syncing
Feb 22, 2018
40e2b51
Merge pull request #22 from EricBarnaba/master
ktecle Feb 22, 2018
3b4e139
commit
Feb 22, 2018
d340524
update
Feb 22, 2018
55ba8d6
Merge branch 'master' into master
JWURD Feb 22, 2018
f6418ac
update
Feb 22, 2018
ff9cf70
Merge pull request #23 from JWURD/master
ktecle Feb 22, 2018
9c5b75e
finished Deck and tests
Feb 22, 2018
e8acb6a
commit
Feb 23, 2018
7c8bdf5
commit
Feb 23, 2018
e0cb5b2
saving for the night
Feb 23, 2018
2651752
Merge branch 'master' into master
EricBarnaba Feb 23, 2018
c09381d
Merge pull request #25 from EricBarnaba/master
ktecle Feb 23, 2018
ff07c45
need to fix createPlayer remove Player tests
Feb 23, 2018
f1147d2
House tests are missing some logic but close
Feb 23, 2018
10bb374
Merge branch 'master' into master
JWURD Feb 23, 2018
9681aef
Merge pull request #26 from JWURD/master
ktecle Feb 23, 2018
c79603a
Merge pull request #24 from vvg3/master
ktecle Feb 23, 2018
3ca5474
commit
Feb 23, 2018
073657b
Card Utilities complete
Feb 23, 2018
7ec35c0
Merge branch 'master' of https://github.com/ktecle/CR-MacroLabs-OOP-C…
Feb 23, 2018
ff3ee1d
Merge pull request #27 from vvg3/master
ktecle Feb 23, 2018
587376e
commit
Feb 23, 2018
a6136d0
commit
Feb 23, 2018
591c90a
line changes
Feb 23, 2018
8f89e26
commit
Feb 23, 2018
aac5601
add Static House Profile
Feb 23, 2018
16e7424
Merge pull request #28 from JWURD/master
ktecle Feb 23, 2018
ddb183e
cleaning
Feb 23, 2018
419bb32
getHand
Feb 23, 2018
94e25f7
commit
Feb 23, 2018
a5023d1
Merge pull request #29 from vvg3/master
ktecle Feb 23, 2018
2fbcbcb
saving while I eat
Feb 23, 2018
0d991f8
sync
Feb 23, 2018
5f1657f
nothing
Feb 23, 2018
e915549
Merge pull request #30 from vvg3/master
ktecle Feb 23, 2018
0d8c9e8
commit
Feb 23, 2018
6965446
no changes
Feb 23, 2018
27916c2
Merge branch 'master' of https://github.com/ktecle/CR-MacroLabs-OOP-C…
Feb 23, 2018
140736a
update
Feb 23, 2018
e3cfc87
commit
Feb 23, 2018
434ade8
to pull
Feb 23, 2018
9f0c047
something
Feb 23, 2018
675b9fc
commit
Feb 23, 2018
c7ee742
syncing up
Feb 23, 2018
73f3477
Merge branch 'master' into master
JWURD Feb 23, 2018
17c5777
Merge pull request #33 from EricBarnaba/master
ktecle Feb 23, 2018
71d8200
Merge pull request #32 from JWURD/master
ktecle Feb 23, 2018
5c6f288
commit
Feb 23, 2018
e7f275f
Merge branch 'master' of https://github.com/ktecle/CR-MacroLabs-OOP-C…
Feb 23, 2018
292868e
Merge branch 'master' into master
ktecle Feb 23, 2018
3db4e74
Merge pull request #31 from vvg3/master
ktecle Feb 23, 2018
99b9aee
cleaning
Feb 23, 2018
78e8ef0
fixed
Feb 23, 2018
9b774b0
Merge pull request #34 from EricBarnaba/master
ktecle Feb 23, 2018
622094d
again
Feb 23, 2018
bfca02d
somthing
Feb 23, 2018
12c08ca
somthing
Feb 23, 2018
a225363
Merge pull request #35 from JWURD/master
ktecle Feb 23, 2018
001d0f5
deal works at least
Feb 24, 2018
d737191
Merge pull request #36 from vvg3/master
ktecle Feb 24, 2018
a55b7f3
commit
Feb 24, 2018
3a008aa
pushing for the night
Feb 24, 2018
57c8826
commit
Feb 24, 2018
e146cf3
Merge pull request #37 from EricBarnaba/master
ktecle Feb 24, 2018
0905ca4
so help me god i don't want merge conflicts
Feb 24, 2018
cb87235
added ShowCard Method in hand
Feb 24, 2018
fac7ff0
commit
Feb 24, 2018
8876ccd
vg
Feb 24, 2018
619759e
Merge pull request #38 from EricBarnaba/master
ktecle Feb 24, 2018
1bfe883
Merge branch 'master' into master
vvg3 Feb 24, 2018
8e3f9a2
Merge pull request #39 from vvg3/master
ktecle Feb 24, 2018
e99a6e0
Merge branch 'master' into master
ktecle Feb 24, 2018
6d84370
Merge pull request #40 from JWURD/master
ktecle Feb 24, 2018
fac7283
saving
Feb 24, 2018
92cee07
Merge pull request #41 from EricBarnaba/master
ktecle Feb 24, 2018
077d2ba
added showHand method to print players hand inside of Hand Class
Feb 24, 2018
397e8e8
saving
Feb 24, 2018
6a2b9f5
Merge pull request #42 from JWURD/master
ktecle Feb 24, 2018
924f2d7
vinces change
Feb 24, 2018
13d0b1c
Merge pull request #43 from vvg3/master
ktecle Feb 24, 2018
72a42ba
saving
Feb 24, 2018
b593495
gofish progress
Feb 24, 2018
992880e
fishy updates
Feb 24, 2018
e8b2c89
updated Black Jack Methods Hit ShowDealersFaceCard and CurrentScore
Feb 24, 2018
204863d
Merge pull request #44 from vvg3/master
ktecle Feb 24, 2018
ce8d69e
Merge pull request #45 from JWURD/master
ktecle Feb 24, 2018
f7661e4
saving
Feb 24, 2018
6375960
go fish, almost
Feb 25, 2018
837bd6e
Merge pull request #46 from vvg3/master
ktecle Feb 25, 2018
74df7c0
current Score works
Feb 25, 2018
6d306e7
syncing
Feb 25, 2018
9f2eb5b
Merge pull request #48 from EricBarnaba/master
ktecle Feb 25, 2018
5d414ac
Merge pull request #47 from JWURD/master
ktecle Feb 25, 2018
a0e32db
pushing for the night
Feb 25, 2018
1136f1e
Merge pull request #49 from EricBarnaba/master
ktecle Feb 25, 2018
8491588
added bet
Feb 25, 2018
c4198f4
updating methods
Feb 25, 2018
fccd966
Merge branch 'master' of https://github.com/ktecle/CR-MacroLabs-OOP-C…
Feb 25, 2018
a3ff66f
Merge pull request #50 from JWURD/master
ktecle Feb 25, 2018
a5ab6f0
counting the number of books now
Feb 25, 2018
2984401
Merge branch 'master' of https://github.com/ktecle/CR-MacroLabs-OOP-C…
Feb 25, 2018
4740f36
made isBlackJack, dealHand
Feb 25, 2018
96fe511
Merge pull request #51 from JWURD/master
ktecle Feb 25, 2018
3872f7a
buildBook method completed
Feb 25, 2018
a3a93cc
Merge branch 'master' of https://github.com/ktecle/CR-MacroLabs-OOP-C…
Feb 25, 2018
f7cc02e
vg
Feb 25, 2018
ec43e47
vg
Feb 25, 2018
68be289
Card comparable and orderCards method for Hand
Feb 25, 2018
1cb8529
Merge pull request #52 from vvg3/master
ktecle Feb 25, 2018
c52ac37
Working on get score method
Feb 25, 2018
f4a78f1
Merge branch 'master' of https://github.com/ktecle/CR-MacroLabs-OOP-C…
Feb 25, 2018
2f5a7b9
working on game to keep playing until player runs out of money
Feb 25, 2018
73f524f
submitting changes
Feb 25, 2018
75f1dcb
Merge pull request #53 from JWURD/master
ktecle Feb 25, 2018
2f2a274
commit
Feb 25, 2018
d0b7fba
Merge branch 'master' of https://github.com/ktecle/CR-MacroLabs-OOP-C…
Feb 25, 2018
6ced3b6
cleaned Up
Feb 25, 2018
003e952
gofish updates
Feb 25, 2018
559103b
Merge pull request #54 from vvg3/master
ktecle Feb 25, 2018
776a8cf
pushing for leon
Feb 25, 2018
6b980d5
Merge pull request #55 from EricBarnaba/master
ktecle Feb 25, 2018
5d78ebd
saving
Feb 25, 2018
9e4766b
saving for syncing
Feb 25, 2018
950c268
close to finishline
Feb 25, 2018
231c445
Merge pull request #57 from JWURD/master
ktecle Feb 25, 2018
87e1632
Merge pull request #56 from EricBarnaba/master
ktecle Feb 25, 2018
e4e6a7c
updating and merging
Feb 25, 2018
efde138
Merge branch 'master' of https://github.com/ktecle/CR-MacroLabs-OOP-C…
Feb 25, 2018
cece071
commiting
Feb 25, 2018
54248b6
main menu added
Feb 25, 2018
954b4db
update
Feb 26, 2018
72d77b8
main menu leave feature functional
Feb 26, 2018
871026d
test suite added
Feb 26, 2018
f018f94
syncing
Feb 26, 2018
fd0979e
need to write more tests
Feb 26, 2018
e2920dd
Merge pull request #59 from JWURD/master
ktecle Feb 26, 2018
6466206
Merge pull request #58 from EricBarnaba/master
ktecle Feb 26, 2018
7222c60
something
Feb 26, 2018
3c1da4e
Merge branch 'master' of https://github.com/ktecle/CR-MacroLabs-OOP-C…
Feb 26, 2018
521ed2d
GoFish updates
Feb 26, 2018
c034a75
Merge branch 'master' of https://github.com/ktecle/CR-MacroLabs-OOP-C…
Feb 26, 2018
978da67
more gofish changes
Feb 26, 2018
f7a22c1
fixing bugs
Feb 26, 2018
6647164
Merge pull request #60 from vvg3/master
ktecle Feb 26, 2018
dff9944
couple bugs in decidingWinner
Feb 26, 2018
8f4cf86
pushing deliverable craps game
Feb 26, 2018
c338ca2
update
Feb 26, 2018
21397ba
Merge pull request #62 from EricBarnaba/master
ktecle Feb 26, 2018
32f7b46
updated
Feb 26, 2018
20ff38c
Merge pull request #61 from JWURD/master
ktecle Feb 26, 2018
21e4474
Merge branch 'master' of https://github.com/ktecle/CR-MacroLabs-OOP-C…
Feb 26, 2018
ce391ee
gofish fix
Feb 26, 2018
05e3449
fixed hand printing to console
Feb 26, 2018
266d02c
vg
Feb 26, 2018
49c5728
dealer books
Feb 26, 2018
1685970
undo dealer changes go fish
Feb 26, 2018
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
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
## Specs
* This repo contains a [UML](https://github.com/Zipcoder/CR-MacroLabs-OOP-Casino/blob/master/UML.pdf) to help get you started.
* The project should include some concept of
* `Player` class
* `Player` objects should be created upon input from a user.
* `io.zipcoder.casino.Player` class
* `io.zipcoder.casino.Player` objects should be created upon input from a user.
* `Game` interface
* Contract which ensures that a class enforces some aspect of _playing_.
* `Gamble` interface
Expand All @@ -22,8 +22,8 @@

## Developmental Notes
* Go fish 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.
* `BlackJack` and `io.zipcoder.casino.Game.Game.cardGame.GoFIsh.GoFish` are both Card Games and should therefore inherit from a common `io.zipcoder.casino.Game.Game.cardGame.CardGame`.
* Any common logic or fields between the games should live io.zipcoder.casino.Game.Game.cardGame.CardGame class, **not** BlackJack **nor** io.zipcoder.casino.Game.Game.cardGame.GoFIsh.GoFish.
* The UML provided is missing classes, properties, and definitions required to complete this project.
* You must have a completed and approved UML diagram before you proceed to do any development
* You can either work by yourself , or in a group no bigger than 3.
Expand Down
Binary file added Updated UML
Binary file not shown.
14 changes: 13 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,25 @@
<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>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
</plugins>
</build>

<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
<scope>io.zipcoder.casinotest.test</scope>
</dependency>
</dependencies>
</project>
4 changes: 3 additions & 1 deletion src/main/java/io/zipcoder/casino/Casino.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package io.zipcoder.casino;


public class Casino {
public static void main(String[] args) {
House.INSTANCE.startCasino();
}
}
50 changes: 50 additions & 0 deletions src/main/java/io/zipcoder/casino/CasinoUtilities/Console.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
package io.zipcoder.casino.CasinoUtilities;

import io.zipcoder.casino.Player;

import java.util.Scanner;

public class Console {

private static Scanner casinoScanner = new Scanner(System.in);
public static Player currentPlayer;

public static String getString() {
return casinoScanner.nextLine();
}

public static Double getDouble() {
Double input;
try {
input = Double.valueOf(casinoScanner.nextLine());
return input;
}
catch(NumberFormatException e){
Console.print("Invalid input: please enter a numerical value");
return -0.001;
}

}

public static int getInt() {

return getDouble().intValue();
}

//TODO: implement later once rules are operational
/*public static void readFile() {

}*/


public static void print(String output) {
/*System.out.println("============================================");
System.out.println("Current Player: " + currentPlayer.getProfile().getName());
System.out.println("Current Balance: " + currentPlayer.getProfile().getAccountBalance());
System.out.println("============================================");*/

System.out.println(output);
}


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

import java.util.HashMap;

public class Escrow {
private HashMap<TypeOfBet, Double> escrow;

public Escrow(){
this.escrow = new HashMap<>(0);
}

public HashMap<TypeOfBet, Double> getEscrow(){
return this.escrow;
}

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

public interface Gambler{

boolean bet(TypeOfBet betType, double amount);
void win(TypeOfBet betType, double payoutMultiplier);
void lose(TypeOfBet betType);
void setEscrow(TypeOfBet typeOfBet, double incomingBet);
double getEscrowBet(TypeOfBet typeOfBet);
public boolean escrowContains(TypeOfBet typeOfBet);
}
12 changes: 12 additions & 0 deletions src/main/java/io/zipcoder/casino/Game/Game.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package io.zipcoder.casino.Game;

import io.zipcoder.casino.Player;

public interface Game {

public void addPlayer(Player player);
public void removePlayer (Player player);
public void startGame();
public void endGame();
public String getRules();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package io.zipcoder.casino.Game.cardGame.BLackJack;

import io.zipcoder.casino.TypeOfBet;

public enum BlackJackBet implements TypeOfBet {
INTIAL_BET,
EVEN_BET,
DOUBLE_DOWN;
}
Loading