Przeglądaj źródła

merge conflict resolved

Jose Bedolla 6 lat temu
rodzic
commit
e141ab5407

+ 9
- 0
src/main/java/io/zipcoder/casino/CardGame.java Wyświetl plik

@@ -1,5 +1,7 @@
1 1
 package io.zipcoder.casino;
2 2
 
3
+import java.lang.reflect.Array;
4
+import java.util.ArrayList;
3 5
 import java.util.HashMap;
4 6
 
5 7
 public abstract class CardGame {
@@ -9,6 +11,7 @@ public abstract class CardGame {
9 11
     private int handSize;
10 12
     private Player playersTurn;
11 13
     private Player[] players;
14
+    private ArrayList<Card> deck = new ArrayList<>();
12 15
 
13 16
 
14 17
     CardGame(int minBet, int maxBet){
@@ -21,6 +24,8 @@ public abstract class CardGame {
21 24
 
22 25
     public void Shuffle(){
23 26
 
27
+        //shuffle the card stack
28
+
24 29
     }
25 30
 
26 31
     public void faceDown(Card card){
@@ -30,4 +35,8 @@ public abstract class CardGame {
30 35
     public void faceUp(Card card){
31 36
         card.setVisibility(true);
32 37
     }
38
+
39
+    public ArrayList<Card> getDeck() {
40
+        return deck;
41
+    }
33 42
 }

+ 10
- 3
src/main/java/io/zipcoder/casino/Console.java Wyświetl plik

@@ -2,14 +2,21 @@ package io.zipcoder.casino;
2 2
 
3 3
 public class Console {
4 4
     private Game[] games;
5
+    private Player player;
5 6
 
6 7
     Console(){}
7 8
 
8
-    public void createAccount(){
9
-
9
+    public void createAccount()
10
+    {
11
+        /*
12
+            ask the player for their name.
13
+            ask the player for their starting balance
14
+            create the player.
15
+         */
10 16
     }
11 17
 
12
-    public void chooseGame(String gameName){
18
+    public void chooseGame(String gameName)
19
+    {
13 20
         /*
14 21
             ask the user for min max bet at the table
15 22
             ask the user which game they would like to play

+ 5
- 0
src/main/java/io/zipcoder/casino/Dice.java Wyświetl plik

@@ -2,13 +2,18 @@ package io.zipcoder.casino;
2 2
 
3 3
 public class Dice {
4 4
 
5
+
5 6
     private int value;
6 7
 
7 8
     public void roll(){
8 9
 
9 10
         value = (int) (Math.random()*6+1);
10 11
 
12
+        //Generate a random number between 1 and 6
13
+        //set value equal to this number
14
+
11 15
     }
16
+
12 17
     public int getValue()
13 18
     {
14 19
         return value;

+ 4
- 0
src/main/java/io/zipcoder/casino/DicePlayer.java Wyświetl plik

@@ -6,4 +6,8 @@ public class DicePlayer {
6 6
     private Player player;
7 7
     Dice[] cup = new Dice[5];
8 8
     ScoreSheet scoreSheet = new ScoreSheet();
9
+
10
+    public DicePlayer(Player player){
11
+        this.player = player;
12
+    }
9 13
 }

+ 9
- 3
src/main/java/io/zipcoder/casino/War.java Wyświetl plik

@@ -11,9 +11,6 @@ public class War extends CardGame implements Gamble, Game {
11 11
         super(minBet, maxBet);
12 12
     }
13 13
 
14
-    public void Deal() {
15
-
16
-    }
17 14
 
18 15
     /**
19 16
      * Specific to war methods
@@ -60,4 +57,13 @@ public class War extends CardGame implements Gamble, Game {
60 57
     public void StartRound() {
61 58
 
62 59
     }
60
+
61
+    public void Deal() {
62
+
63
+        /*
64
+            for every player playing this game (i)
65
+                for every card in the deck (j)
66
+
67
+         */
68
+    }
63 69
 }