diff --git a/bin/cards/maumau/gui/GameTableModel.class b/bin/cards/maumau/gui/GameTableModel.class index 961bf9c..ac806bc 100644 Binary files a/bin/cards/maumau/gui/GameTableModel.class and b/bin/cards/maumau/gui/GameTableModel.class differ diff --git a/bin/cards/maumau/gui/PlayerFrame.class b/bin/cards/maumau/gui/PlayerFrame.class index af19f5d..3a69d9e 100644 Binary files a/bin/cards/maumau/gui/PlayerFrame.class and b/bin/cards/maumau/gui/PlayerFrame.class differ diff --git a/bin/cards/maumau/model/ActionHandler.class b/bin/cards/maumau/model/ActionHandler.class index f288d9a..0c8f2d4 100644 Binary files a/bin/cards/maumau/model/ActionHandler.class and b/bin/cards/maumau/model/ActionHandler.class differ diff --git a/bin/cards/maumau/model/GameState.class b/bin/cards/maumau/model/GameState.class deleted file mode 100644 index bde6402..0000000 Binary files a/bin/cards/maumau/model/GameState.class and /dev/null differ diff --git a/bin/cards/maumau/model/MauMau.class b/bin/cards/maumau/model/MauMau.class index b0e84a4..2347370 100644 Binary files a/bin/cards/maumau/model/MauMau.class and b/bin/cards/maumau/model/MauMau.class differ diff --git a/bin/cards/maumau/model/gamestate/Canceled.class b/bin/cards/maumau/model/gamestate/Canceled.class new file mode 100644 index 0000000..cfd1f19 Binary files /dev/null and b/bin/cards/maumau/model/gamestate/Canceled.class differ diff --git a/bin/cards/maumau/model/gamestate/Finished.class b/bin/cards/maumau/model/gamestate/Finished.class new file mode 100644 index 0000000..bff57d1 Binary files /dev/null and b/bin/cards/maumau/model/gamestate/Finished.class differ diff --git a/bin/cards/maumau/model/gamestate/GamePlay.class b/bin/cards/maumau/model/gamestate/GamePlay.class deleted file mode 100644 index 95c92cd..0000000 Binary files a/bin/cards/maumau/model/gamestate/GamePlay.class and /dev/null differ diff --git a/bin/cards/maumau/model/gamestate/GameState.class b/bin/cards/maumau/model/gamestate/GameState.class new file mode 100644 index 0000000..11f0392 Binary files /dev/null and b/bin/cards/maumau/model/gamestate/GameState.class differ diff --git a/bin/cards/maumau/model/gamestate/Initialized.class b/bin/cards/maumau/model/gamestate/Initialized.class index ac5170d..b081c43 100644 Binary files a/bin/cards/maumau/model/gamestate/Initialized.class and b/bin/cards/maumau/model/gamestate/Initialized.class differ diff --git a/bin/cards/maumau/model/gamestate/JackChosen.class b/bin/cards/maumau/model/gamestate/JackChosen.class new file mode 100644 index 0000000..b042ae0 Binary files /dev/null and b/bin/cards/maumau/model/gamestate/JackChosen.class differ diff --git a/bin/cards/maumau/model/gamestate/Normal.class b/bin/cards/maumau/model/gamestate/Normal.class new file mode 100644 index 0000000..58026d0 Binary files /dev/null and b/bin/cards/maumau/model/gamestate/Normal.class differ diff --git a/bin/cards/maumau/model/gamestate/SevenChosen.class b/bin/cards/maumau/model/gamestate/SevenChosen.class new file mode 100644 index 0000000..c2276f0 Binary files /dev/null and b/bin/cards/maumau/model/gamestate/SevenChosen.class differ diff --git a/bin/cards/maumau/model/gamestate/SuitChosen.class b/bin/cards/maumau/model/gamestate/SuitChosen.class new file mode 100644 index 0000000..063c2b5 Binary files /dev/null and b/bin/cards/maumau/model/gamestate/SuitChosen.class differ diff --git a/src/cards/maumau/model/ActionHandler.java b/src/cards/maumau/model/ActionHandler.java index cf99291..5a92269 100644 --- a/src/cards/maumau/model/ActionHandler.java +++ b/src/cards/maumau/model/ActionHandler.java @@ -14,8 +14,6 @@ class ActionHandler { private GameState gameState; - private GamePlay gameplay; - /** * Constructs an ActionHandler for the specified MauMau game. * @@ -23,8 +21,7 @@ class ActionHandler { */ ActionHandler(MauMau game) { this.game = game; - gameState = GameState.GAME_PLAY; - gameplay = new Initialized(); + gameState = new Initialized(); } /** diff --git a/src/cards/maumau/model/GameState.java b/src/cards/maumau/model/GameState.java deleted file mode 100644 index a87cebb..0000000 --- a/src/cards/maumau/model/GameState.java +++ /dev/null @@ -1,20 +0,0 @@ -package cards.maumau.model; - -/** - * Represents the state of the Mau-Mau game. - */ -public enum GameState { - /** - * The game has been initialized, but has not yet started. - */ - GAME_PLAY, - /** - * The game is over. The final ranking of players can be - * obtained using {@link MauMau#getRanking()}. - */ - GAME_FINISHED, - /** - * The game has been canceled due to insufficient cards. - */ - GAME_CANCELED, -} diff --git a/src/cards/maumau/model/MauMau.java b/src/cards/maumau/model/MauMau.java index 46ae664..2fd65fc 100644 --- a/src/cards/maumau/model/MauMau.java +++ b/src/cards/maumau/model/MauMau.java @@ -2,6 +2,7 @@ package cards.maumau.model; import cards.Card; import cards.Suit; +import cards.maumau.model.gamestate.*; import java.util.ArrayList; import java.util.List; diff --git a/src/cards/maumau/model/gamestate/Canceled.java b/src/cards/maumau/model/gamestate/Canceled.java new file mode 100644 index 0000000..689959b --- /dev/null +++ b/src/cards/maumau/model/gamestate/Canceled.java @@ -0,0 +1,5 @@ +package cards.maumau.model.gamestate; + +public class Canceled implements GameState{ + +} diff --git a/src/cards/maumau/model/gamestate/Finished.java b/src/cards/maumau/model/gamestate/Finished.java new file mode 100644 index 0000000..cdd0dd2 --- /dev/null +++ b/src/cards/maumau/model/gamestate/Finished.java @@ -0,0 +1,5 @@ +package cards.maumau.model.gamestate; + +public class Finished implements GameState{ + +} diff --git a/src/cards/maumau/model/gamestate/GamePlay.java b/src/cards/maumau/model/gamestate/GameState.java similarity index 57% rename from src/cards/maumau/model/gamestate/GamePlay.java rename to src/cards/maumau/model/gamestate/GameState.java index d054e15..381e35f 100644 --- a/src/cards/maumau/model/gamestate/GamePlay.java +++ b/src/cards/maumau/model/gamestate/GameState.java @@ -1,5 +1,5 @@ package cards.maumau.model.gamestate; -public interface GamePlay { +public interface GameState { } diff --git a/src/cards/maumau/model/gamestate/Initialized.java b/src/cards/maumau/model/gamestate/Initialized.java index 7dc949b..04eb82c 100644 --- a/src/cards/maumau/model/gamestate/Initialized.java +++ b/src/cards/maumau/model/gamestate/Initialized.java @@ -1,7 +1,6 @@ package cards.maumau.model.gamestate; -import cards.maumau.model.GameState; -public class Initialized implements GamePlay { +public class Initialized implements GameState { } diff --git a/src/cards/maumau/model/gamestate/JackChosen.java b/src/cards/maumau/model/gamestate/JackChosen.java new file mode 100644 index 0000000..49998ea --- /dev/null +++ b/src/cards/maumau/model/gamestate/JackChosen.java @@ -0,0 +1,5 @@ +package cards.maumau.model.gamestate; + +public class JackChosen implements GameState{ + +} diff --git a/src/cards/maumau/model/gamestate/Normal.java b/src/cards/maumau/model/gamestate/Normal.java new file mode 100644 index 0000000..9ad9f46 --- /dev/null +++ b/src/cards/maumau/model/gamestate/Normal.java @@ -0,0 +1,5 @@ +package cards.maumau.model.gamestate; + +public class Normal implements GameState{ + +} diff --git a/src/cards/maumau/model/gamestate/SevenChosen.java b/src/cards/maumau/model/gamestate/SevenChosen.java new file mode 100644 index 0000000..84c0585 --- /dev/null +++ b/src/cards/maumau/model/gamestate/SevenChosen.java @@ -0,0 +1,5 @@ +package cards.maumau.model.gamestate; + +public class SevenChosen implements GameState{ + +} diff --git a/src/cards/maumau/model/gamestate/SuitChosen.java b/src/cards/maumau/model/gamestate/SuitChosen.java new file mode 100644 index 0000000..4de9ffe --- /dev/null +++ b/src/cards/maumau/model/gamestate/SuitChosen.java @@ -0,0 +1,5 @@ +package cards.maumau.model.gamestate; + +public class SuitChosen implements GameState{ + +}