瀏覽代碼

generified some classes, sorry

NedRedmond 6 年之前
父節點
當前提交
d100cda2d3

+ 1
- 4
src/main/java/io/zipcoder/casino/Casino.java 查看文件

7
 import io.zipcoder.casino.player.Player;
7
 import io.zipcoder.casino.player.Player;
8
 import io.zipcoder.casino.player.Players;
8
 import io.zipcoder.casino.player.Players;
9
 import io.zipcoder.casino.utilities.Console;
9
 import io.zipcoder.casino.utilities.Console;
10
-import io.zipcoder.casino.utilities.Game;
11
-
12
-import java.lang.reflect.Array;
13
-import java.util.Arrays;
10
+import io.zipcoder.casino.utilities.abstracts.Game;
14
 
11
 
15
 public class Casino {
12
 public class Casino {
16
     private Game game;
13
     private Game game;

+ 2
- 1
src/main/java/io/zipcoder/casino/cardgames/BlackJack.java 查看文件

1
 package io.zipcoder.casino.cardgames;
1
 package io.zipcoder.casino.cardgames;
2
 
2
 
3
 import io.zipcoder.casino.utilities.Card;
3
 import io.zipcoder.casino.utilities.Card;
4
+import io.zipcoder.casino.utilities.abstracts.CardGame;
4
 import io.zipcoder.casino.utilities.containers.CardHand;
5
 import io.zipcoder.casino.utilities.containers.CardHand;
5
 import io.zipcoder.casino.utilities.containers.Deck;
6
 import io.zipcoder.casino.utilities.containers.Deck;
6
 import io.zipcoder.casino.utilities.Console;
7
 import io.zipcoder.casino.utilities.Console;
7
-import io.zipcoder.casino.utilities.Gamble;
8
+import io.zipcoder.casino.utilities.interfaces.Gamble;
8
 import io.zipcoder.casino.player.BlackJackPlayer;
9
 import io.zipcoder.casino.player.BlackJackPlayer;
9
 import io.zipcoder.casino.player.Player;
10
 import io.zipcoder.casino.player.Player;
10
 import io.zipcoder.casino.player.Players;
11
 import io.zipcoder.casino.player.Players;

+ 1
- 0
src/main/java/io/zipcoder/casino/cardgames/GoFish.java 查看文件

1
 package io.zipcoder.casino.cardgames;
1
 package io.zipcoder.casino.cardgames;
2
 
2
 
3
+import io.zipcoder.casino.utilities.abstracts.CardGame;
3
 import io.zipcoder.casino.utilities.containers.Deck;
4
 import io.zipcoder.casino.utilities.containers.Deck;
4
 import io.zipcoder.casino.player.GoFishPlayer;
5
 import io.zipcoder.casino.player.GoFishPlayer;
5
 import io.zipcoder.casino.player.Player;
6
 import io.zipcoder.casino.player.Player;

+ 2
- 1
src/main/java/io/zipcoder/casino/dicegames/Craps.java 查看文件

1
 package io.zipcoder.casino.dicegames;
1
 package io.zipcoder.casino.dicegames;
2
 
2
 
3
 import io.zipcoder.casino.utilities.Console;
3
 import io.zipcoder.casino.utilities.Console;
4
-import io.zipcoder.casino.utilities.Gamble;
4
+import io.zipcoder.casino.utilities.interfaces.Gamble;
5
 import io.zipcoder.casino.player.CrapsPlayer;
5
 import io.zipcoder.casino.player.CrapsPlayer;
6
 import io.zipcoder.casino.player.Player;
6
 import io.zipcoder.casino.player.Player;
7
 import io.zipcoder.casino.player.Players;
7
 import io.zipcoder.casino.player.Players;
8
+import io.zipcoder.casino.utilities.abstracts.DiceGame;
8
 
9
 
9
 import java.util.ArrayList;
10
 import java.util.ArrayList;
10
 
11
 

src/main/java/io/zipcoder/casino/cardgames/CardGame.java → src/main/java/io/zipcoder/casino/utilities/abstracts/CardGame.java 查看文件

1
-package io.zipcoder.casino.cardgames;
1
+package io.zipcoder.casino.utilities.abstracts;
2
 
2
 
3
-import io.zipcoder.casino.player.BlackJackPlayer;
4
 import io.zipcoder.casino.utilities.containers.Deck;
3
 import io.zipcoder.casino.utilities.containers.Deck;
5
-import io.zipcoder.casino.utilities.Game;
6
 import io.zipcoder.casino.player.Player;
4
 import io.zipcoder.casino.player.Player;
7
 
5
 
8
 public abstract class CardGame extends Game {
6
 public abstract class CardGame extends Game {

src/main/java/io/zipcoder/casino/dicegames/DiceGame.java → src/main/java/io/zipcoder/casino/utilities/abstracts/DiceGame.java 查看文件

1
-package io.zipcoder.casino.dicegames;
1
+package io.zipcoder.casino.utilities.abstracts;
2
 
2
 
3
 import io.zipcoder.casino.utilities.Dice;
3
 import io.zipcoder.casino.utilities.Dice;
4
-import io.zipcoder.casino.utilities.Game;
5
 
4
 
6
 public abstract class DiceGame extends Game {
5
 public abstract class DiceGame extends Game {
7
 
6
 

src/main/java/io/zipcoder/casino/utilities/Game.java → src/main/java/io/zipcoder/casino/utilities/abstracts/Game.java 查看文件

1
-package io.zipcoder.casino.utilities;
1
+package io.zipcoder.casino.utilities.abstracts;
2
 
2
 
3
 public abstract class Game {
3
 public abstract class Game {
4
     String className = this.getClass().getName();
4
     String className = this.getClass().getName();

src/main/java/io/zipcoder/casino/utilities/Gamble.java → src/main/java/io/zipcoder/casino/utilities/interfaces/Gamble.java 查看文件

1
-package io.zipcoder.casino.utilities;
1
+package io.zipcoder.casino.utilities.interfaces;
2
 
2
 
3
 import io.zipcoder.casino.player.Player;
3
 import io.zipcoder.casino.player.Player;
4
 
4