From ad3ec299624ae0b06eca34088d3b2a787ca9f3d1 Mon Sep 17 00:00:00 2001 From: peet Date: Thu, 13 Jun 2024 16:40:15 +0000 Subject: [PATCH] minas --- bin/cards/maumau/gui/GameTableModel.class | Bin 1318 -> 1768 bytes bin/cards/maumau/gui/PlayerFrame.class | Bin 2344 -> 8914 bytes bin/cards/maumau/model/ActionHandler.class | Bin 2469 -> 2348 bytes bin/cards/maumau/model/Canceled.class | Bin 1175 -> 1178 bytes bin/cards/maumau/model/CardHandler.class | Bin 2835 -> 2835 bytes bin/cards/maumau/model/Finished.class | Bin 1175 -> 1178 bytes bin/cards/maumau/model/GameState.class | Bin 346 -> 1217 bytes bin/cards/maumau/model/HandlerState.class | Bin 0 -> 352 bytes bin/cards/maumau/model/Initialized.class | Bin 1870 -> 2244 bytes bin/cards/maumau/model/JackChosen.class | Bin 1385 -> 1394 bytes bin/cards/maumau/model/Normal.class | Bin 1662 -> 1671 bytes bin/cards/maumau/model/SevenChosen.class | Bin 1952 -> 1961 bytes bin/cards/maumau/model/SuitChosen.class | Bin 2210 -> 2219 bytes src/cards/maumau/model/ActionHandler.java | 30 +++++++------ src/cards/maumau/model/Canceled.java | 2 +- src/cards/maumau/model/CardHandler.java | 2 +- src/cards/maumau/model/Finished.java | 2 +- src/cards/maumau/model/GameState.java | 42 +++++++++++------- src/cards/maumau/model/HandlerState.java | 17 +++++++ src/cards/maumau/model/Initialized.java | 9 ++-- src/cards/maumau/model/JackChosen.java | 5 ++- src/cards/maumau/model/Normal.java | 4 +- src/cards/maumau/model/SevenChosen.java | 4 +- src/cards/maumau/model/SuitChosen.java | 8 ++-- .../maumau/model/WaitForNextTurnState.java | 2 +- 25 files changed, 82 insertions(+), 45 deletions(-) create mode 100644 bin/cards/maumau/model/HandlerState.class create mode 100644 src/cards/maumau/model/HandlerState.java diff --git a/bin/cards/maumau/gui/GameTableModel.class b/bin/cards/maumau/gui/GameTableModel.class index ebae0d6432333dd71204cfbc50cf1edacaffdcf7..eafd47fd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h!XL={#&)uE<5IFuB$@GCV6mUwF$St(3apZkobG2Q!}o^Lz1T`k@rF|MfB z0Sk;e%a?8_5#N#{*`fx=TGzN3tD72&Q<@!nQHa~)79k@%vArz zxd&W&?gaCXxt+m9{+}fpn4yVk;aNi1l{k+V^q$7hkwwl3)NTlVQP$CAb#m0HQuPVu zm!IOL3kAQD+R4YXVe2Qg};$5Mm70r|3$(YB^FjH32 zloe8HMhY9rOnE&`xkk#Wk-{#ED5EL5mQK+IQ*?7oiq@b~0@ZqBfa_`CCV^XHfbUR4 z3do*~fFn7-nT~Upaqb!8WT%@c@1-gCNog1<@8g4rQsbz+n_&HC{@_Qb)4X2%JYhT$ zm;E+24aQre#)n4Z5973ML{iSHcG((L@iE2!jV8=$Rp;aD^SUdQ&mUpO;K=mvBT+mu zI&vpY9ThLSc4~#JrT8)S``XmMj2Q83$kh delta 35 pcmbQmIh}KYn}keqVo^%5er{qZ5b5XUr=;fSyC>$RZcMaf0RY=H3`hU~ diff --git a/bin/cards/maumau/model/CardHandler.class b/bin/cards/maumau/model/CardHandler.class index e79c97ed65419a2a81d91472cb8a19047d1a0331..eb9a422c3d58add0ad21a4b1066d2cfc80a2d1fe 100644 GIT binary patch delta 14 VcmbO%Hd$;#Hyfkk<{q|o762rl1cm?r delta 14 VcmbO%Hd$;#HyfkE<{q|o762rf1cd+q diff --git a/bin/cards/maumau/model/Finished.class b/bin/cards/maumau/model/Finished.class index caea057e27ee2b265a4098543c2211826f634ed8..719c53734b92caefc997107a63f752780ccc7dbc 100644 GIT binary patch delta 23 ecmbQvIg4|G8>9ThLSc4~#JrT8)S``XmMj2Q83$kh delta 35 pcmbQmIh}KYn}keqVo^%5er{qZ5b5XUr=;fSyC>$RZcMaf0RY=H3`hU~ diff --git a/bin/cards/maumau/model/GameState.class b/bin/cards/maumau/model/GameState.class index e87cc248726ccc4f2429cc8a0606262ea4e81955..808c0e9560757d9e004a0778cf6444c6e99ccd91 100644 GIT binary patch literal 1217 zcmah|ZBNrs6n-w-+N~6rlXoVFplkyfAmGagVVM;d%VsPrseT}rQD@0sOxKa{tJLuU zqLKL7A7woEGGSkYuGu+Hd!BQj^U~jczFz>y;)RMHhIpBKhs|`2x9CpS8i!6bz0GTm z<#XRr5oG8;;>SE)<@HM1sJChi(e3Pxv7ayGck@{@|K51XFlpYDCc_YsoMOp%$IvJJ zT(*!iOhFF5HM2HDZ|-%mXc_y~UVfL5QP|s=EoIF;!(y2FaN7aljdInkyZ$CaAdxIl z)*RImMo0rgOvhaeGAJ9Jkl}=RU6ti~ZoQJpCrc5E9o7+o5{4?km=0BdumEu#VF4ln zOzDUSpb79mhXzG>vpRaAGYpt+-6^zc2adPP52_AnFdJoFEpg8kSU%JcK#Y|7pWG&i zJLc7vL(X&}c}uw(7O<$|G0mc@jFYDC)O4h=ME&NT$4|W{)VbgC=;cyZK0)5NS=?r3Yndh#pygM##>9{TvNT_5X|&SPRHdbX z0?~0XPGSUU^nK_j{s5sbgvC|)0cOXdfiv7W#gGIeK?z1B7!OG>A;CRGf=LPPs}f9y ze^Q1(8$*^IY-7~2Lv2i0w$jF=WvgvWTc?=$Mo0DFA^k6s9FSyeS`?CN5 literal 346 zcmZutF-`+95F95VmmH9U&?4&4;F5w0A%zABq?6JwK0_RQXLR-<@iht_z@rdr=aMRt zwWFO`&FuR3@B0V99nLfK1TGXcrI!`8{AA@yZRG=1x(F0>hJnCrL!Trq)o=3YWusLP z7*kn3Tl&(Cz~$ocfW=n5y;||G57dO{DbQa;CVw@x@#`&>E2@>YyJqd2*Y~`Wz;x#v z+hmoiBp0pWCH8V`lRWV6=7U3Ocf%otYa6AP#&Ygtf6{flW(e>Y{{k@L3y;7AV}?<} aaff+_$2dv+DJBW09Y2f6PG?+unEwM&a8Abn diff --git a/bin/cards/maumau/model/HandlerState.class b/bin/cards/maumau/model/HandlerState.class new file mode 100644 index 0000000000000000000000000000000000000000..50225512fffce59fdc8c13d3547672c04f578ef2 GIT binary patch literal 352 zcmZutyG{c!5FCe)OO8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f176f34d8d..1dfe43f4651312c6c83049d6d951daef0a0ebf8c 100644 GIT binary patch delta 150 zcmaFK^@(eOhqQchVo^%5er{qZ5b5XUr=;fSdnD$i$RZcNT&)Z{5nEdg`85tBc zd~m4V#I%BuQE2i?W+z6G$qQLTCo{4rGm1`DWpQE@1M_QHlqaXNh)v!Gq!+NTO}@`! Y%P0w!F=ADoEW;|sZp^^Iz{Fqz0R8tZCIA2c diff --git a/bin/cards/maumau/model/Normal.class b/bin/cards/maumau/model/Normal.class index ea7d610c29c22376e7626b29d0c34985f8c8efd6..3d4eb021eccfff36064766763bdf61f4188c51d0 100644 GIT binary patch delta 61 zcmeyz)6P4=g;9R8BC{~NM`B(|PHNG{n9WSW{KcsyP=0VpVo53^gUV!iW>J`$%@)jV F%m7|%68r!F delta 51 zcmZqY{l_!Gg;8eWLSYv7#N5=4@tc_hd5Tj@K%C%`#FA7-21SjDg(6_t&5q1&%mBN5 B5E=jg diff --git a/bin/cards/maumau/model/SevenChosen.class b/bin/cards/maumau/model/SevenChosen.class index aff18e54028cff372f1f3d8cd7913fea4e41b43b..450ca4eac2609a6d6690066d1479e9172f6605d8 100644 GIT binary patch delta 74 zcmZ3$zmk7~r?h->Vo^%5er{qZ5b5XUr=;fSdnD$i$RZcKi|tjSZHS_0w(mn4>?GBPM? N_~1~zxsFAb1pvTY9L)d# diff --git a/src/cards/maumau/model/ActionHandler.java b/src/cards/maumau/model/ActionHandler.java index 0254a01..02ffb61 100644 --- a/src/cards/maumau/model/ActionHandler.java +++ b/src/cards/maumau/model/ActionHandler.java @@ -12,6 +12,7 @@ class ActionHandler { private int ctr7 = 0; private GameState gameState; + private HandlerState handlerState; /** * Constructs an ActionHandler for the specified MauMau game. @@ -20,7 +21,14 @@ class ActionHandler { */ ActionHandler(MauMau game) { this.game = game; - gameState = new Initialized(this); + } + + void setGameState(GameState gameState) { + this.gameState = gameState; + } + + void setHandlerState (HandlerState handlerState) { + this.handlerState = handlerState; } /** @@ -29,28 +37,28 @@ class ActionHandler { * @param player The player to be added to the game. */ void addPlayer(Player player) { - gameState.addPlayer(player); + //TODO implement } /** * Starts the game. */ void startGame() { - gameState.startGame(); + //TODO implement } /** * Transitions the game state to GAME_OVER. */ void finishGame() { - gameState.finishGame(); + //TODO implement } /** * Transitions the game state to GAME_CANCELED. */ void cancelGame() { - gameState.cancelGame(); + //TODO implement } /** @@ -59,7 +67,7 @@ class ActionHandler { * @param c The card chosen by the player. */ void chooseCard(Card c) { - gameState.chooseCard(c); + //TODO implement } /** @@ -68,21 +76,21 @@ class ActionHandler { * @param suit The suit chosen by the player. */ void chooseSuit(Suit suit) { - gameState.chooseSuit(suit); + //TODO implement } /** * Lets the player skip a round. **/ void skip() { - gameState.skip(); + //TODO implement } /** * Handles the player saying "no 7" in the current state. */ void no7() { - gameState.no7(); + //TODO implement } /** @@ -142,10 +150,6 @@ class ActionHandler { return gameState; } - void setGameState(GameState gameState) { - this.gameState = gameState; - } - /** * Checks if a card can be played by the current player in the current state. * diff --git a/src/cards/maumau/model/Canceled.java b/src/cards/maumau/model/Canceled.java index 2a80fb1..5c356a8 100644 --- a/src/cards/maumau/model/Canceled.java +++ b/src/cards/maumau/model/Canceled.java @@ -3,7 +3,7 @@ package cards.maumau.model; import cards.Card; import cards.Suit; -public class Canceled implements GameState{ +public class Canceled implements HandlerState { private final ActionHandler handler; diff --git a/src/cards/maumau/model/CardHandler.java b/src/cards/maumau/model/CardHandler.java index b0cfe80..194ea3f 100644 --- a/src/cards/maumau/model/CardHandler.java +++ b/src/cards/maumau/model/CardHandler.java @@ -9,7 +9,7 @@ import java.util.List; /** * Manages the draw pile and discard pile in a MauMau game. */ -class CardHandler { +public class CardHandler { private final MauMau game; private final int numCardsPerPlayer; private final List drawPile = new LinkedList<>(); diff --git a/src/cards/maumau/model/Finished.java b/src/cards/maumau/model/Finished.java index f2ba8e9..6c8ca69 100644 --- a/src/cards/maumau/model/Finished.java +++ b/src/cards/maumau/model/Finished.java @@ -3,7 +3,7 @@ package cards.maumau.model; import cards.Card; import cards.Suit; -public class Finished implements GameState{ +public class Finished implements HandlerState{ private final ActionHandler handler; Finished(ActionHandler handler) { diff --git a/src/cards/maumau/model/GameState.java b/src/cards/maumau/model/GameState.java index 283a976..08d3116 100644 --- a/src/cards/maumau/model/GameState.java +++ b/src/cards/maumau/model/GameState.java @@ -1,17 +1,29 @@ package cards.maumau.model; -import cards.Card; -import cards.Suit; - - -interface GameState { - void addPlayer(Player player); - void startGame(); - void finishGame(); - void cancelGame(); - void chooseCard(Card c); - void chooseSuit(Suit suit); - void skip(); - void no7(); - // boolean canPlay(Card c); -} +/** + * Represents the state of the Mau-Mau game. + */ +public enum GameState { + /** + * The game has been initialized, but has not yet started. + */ + GAME_INITIALIZED, + /** + * The game is over. The final ranking of players can be + * obtained using {@link MauMau#getRanking()}. + */ + GAME_OVER, + /** + * The game has been canceled due to insufficient cards. + */ + GAME_CANCELED, + /** + * The game is currently in progress with players taking turns. + */ + PLAY, + /** + * The game is in progress and the current player has played + * a Jack, and is required to choose a suit. + */ + CHOOSE_SUIT +} \ No newline at end of file diff --git a/src/cards/maumau/model/HandlerState.java b/src/cards/maumau/model/HandlerState.java new file mode 100644 index 0000000..9736aa4 --- /dev/null +++ b/src/cards/maumau/model/HandlerState.java @@ -0,0 +1,17 @@ +package cards.maumau.model; + +import cards.Card; +import cards.Suit; + +public interface HandlerState { + + void addPlayer(Player player); + void startGame(); + void finishGame(); + void cancelGame(); + void chooseCard(Card c); + void chooseSuit(Suit suit); + void skip(); + void no7(); + +} diff --git a/src/cards/maumau/model/Initialized.java b/src/cards/maumau/model/Initialized.java index 30bb95e..88f829a 100644 --- a/src/cards/maumau/model/Initialized.java +++ b/src/cards/maumau/model/Initialized.java @@ -3,7 +3,7 @@ package cards.maumau.model; import cards.Card; import cards.Suit; -public class Initialized implements GameState { +public class Initialized implements HandlerState { private final ActionHandler handler; @@ -19,9 +19,12 @@ public class Initialized implements GameState { public void startGame() { try { handler.getGame().getCardHandler().dealCards(); - handler.setGameState(new Normal(handler)); + handler.setHandlerState(new Normal(handler)); + handler.setGameState(GameState.PLAY); } catch (Exception e) { - handler.setGameState(new Canceled(handler)); + System.err.println("Not enough Cards!"); + handler.setHandlerState(new Canceled(handler)); + handler.setGameState(GameState.GAME_CANCELED); } } diff --git a/src/cards/maumau/model/JackChosen.java b/src/cards/maumau/model/JackChosen.java index 81e5f35..5a9bb82 100644 --- a/src/cards/maumau/model/JackChosen.java +++ b/src/cards/maumau/model/JackChosen.java @@ -3,7 +3,7 @@ package cards.maumau.model; import cards.Card; import cards.Suit; -public class JackChosen implements GameState{ +public class JackChosen implements HandlerState{ private final ActionHandler handler; JackChosen(ActionHandler handler) { @@ -14,7 +14,8 @@ public class JackChosen implements GameState{ public void chooseSuit(Suit suit){ handler.setChosenSuit(suit); - handler.setGameState(new SuitChosen(handler)); + handler.setHandlerState(new SuitChosen(handler)); + //handler.setGameState(PLAY); } public void startGame(){} diff --git a/src/cards/maumau/model/Normal.java b/src/cards/maumau/model/Normal.java index 70fd88f..ae9bc86 100644 --- a/src/cards/maumau/model/Normal.java +++ b/src/cards/maumau/model/Normal.java @@ -3,7 +3,7 @@ package cards.maumau.model; import cards.Card; import cards.Suit; -public class Normal implements GameState{ +public class Normal implements HandlerState { private final ActionHandler handler; Normal(ActionHandler handler) { @@ -15,7 +15,7 @@ public class Normal implements GameState{ public void finishGame(){ // Logic for finishing Game ???? if (handler.getGame().getPlayerHandler().getPlayers().isEmpty()) { - handler.setGameState(new Finished(handler)); + handler.setHandlerState(new Finished(handler)); } } public void cancelGame(){} diff --git a/src/cards/maumau/model/SevenChosen.java b/src/cards/maumau/model/SevenChosen.java index fcf9117..2ede84b 100644 --- a/src/cards/maumau/model/SevenChosen.java +++ b/src/cards/maumau/model/SevenChosen.java @@ -3,7 +3,7 @@ package cards.maumau.model; import cards.Card; import cards.Suit; -public class SevenChosen implements GameState{ +public class SevenChosen implements HandlerState{ private final ActionHandler handler; SevenChosen(ActionHandler handler) { @@ -30,6 +30,6 @@ public class SevenChosen implements GameState{ public void no7(){ handler.getGame().getPlayerHandler().getCurrentPlayer().drawCards(2 * handler.get7Counter()); handler.reset7Counter(); - handler.setGameState(new Normal(handler)); + handler.setHandlerState(new Normal(handler)); } } diff --git a/src/cards/maumau/model/SuitChosen.java b/src/cards/maumau/model/SuitChosen.java index 8aa4cab..2729d3a 100644 --- a/src/cards/maumau/model/SuitChosen.java +++ b/src/cards/maumau/model/SuitChosen.java @@ -4,7 +4,7 @@ import cards.Card; import cards.Suit; import cards.Rank; -public class SuitChosen implements GameState{ +public class SuitChosen implements HandlerState{ private final ActionHandler handler; SuitChosen(ActionHandler handler) { @@ -24,13 +24,13 @@ public class SuitChosen implements GameState{ if(c.rank() == Rank.SEVEN) { handler.increment7Counter(); handler.getGame().getPlayerHandler().nextTurn(1); - handler.setGameState(new SevenChosen(handler)); + handler.setHandlerState(new SevenChosen(handler)); } else if (c.rank() == Rank.EIGHT) { handler.getGame().getPlayerHandler().nextTurn(2); - handler.setGameState(new Normal(handler)); + handler.setHandlerState(new Normal(handler)); } else { handler.getGame().getPlayerHandler().nextTurn(1); - handler.setGameState(new Normal(handler)); + handler.setHandlerState(new Normal(handler)); } } diff --git a/src/cards/maumau/model/WaitForNextTurnState.java b/src/cards/maumau/model/WaitForNextTurnState.java index ee44a6d..97bc700 100644 --- a/src/cards/maumau/model/WaitForNextTurnState.java +++ b/src/cards/maumau/model/WaitForNextTurnState.java @@ -1,6 +1,6 @@ package cards.maumau.model; -public class WaitForNextTurnState implements PlayerState { +public class WaitForNextTurnState implements PlayerState { private final PlayerHandler handler; public WaitForNextTurnState(PlayerHandler handler) {