Feat/ms 4 integration #282

Merged
jona.walpert merged 23 commits from feat/ms-4-integration into main 2026-04-13 03:07:52 +02:00
Showing only changes of commit 66f0d734cf - Show all commits
@@ -88,16 +88,8 @@ public class GameControllerTest {
game.playerCall(PlayerId.of("Jona")); game.playerCall(PlayerId.of("Jona"));
game.playerRaise(PlayerId.of("Lars"), 1200); game.playerRaise(PlayerId.of("Lars"), 1200);
game.dealFlop();
List<Card> board = game.getCommunityCards(); List<Card> board = game.getCommunityCards();
assertEquals(3, board.size()); assertTrue(board.size() >= 3 && board.size() <= 5);
game.dealTurn();
assertEquals(4, game.getCommunityCards().size());
game.dealRiver();
assertEquals(5, game.getCommunityCards().size());
for (Card c : game.getCommunityCards()) { for (Card c : game.getCommunityCards()) {
@@ -113,7 +105,7 @@ public class GameControllerTest {
assertNotNull(mathis); assertNotNull(mathis);
assertEquals(5, game.getCommunityCards().size()); assertTrue(game.getCommunityCards().size() >= 3);
assertEquals(4, game.getState().getPlayers().size()); assertEquals(4, game.getState().getPlayers().size());
@@ -189,15 +181,13 @@ public class GameControllerTest {
assertTrue(potAfter >= potBefore, "The pot must be larger after actions"); assertTrue(potAfter >= potBefore, "The pot must be larger after actions");
game.dealFlop();
assertEquals(3, game.getCommunityCards().size(), "The flop must have 3 cards"); assertEquals(3, game.getCommunityCards().size(), "The flop must have 3 cards");
game.dealTurn(); game.playerCall(PlayerId.of("Julian"));
assertEquals(4, game.getCommunityCards().size(), "A turn must result in 4 cards"); assertEquals(4, game.getCommunityCards().size(), "A turn must result in 4 cards");
game.dealRiver(); game.playerCall(PlayerId.of("Jona"));
assertEquals(5, game.getCommunityCards().size(), "The river must consist of 5 cards"); assertEquals(5, game.getCommunityCards().size(), "The river must consist of 5 cards");
@@ -291,16 +281,13 @@ public class GameControllerTest {
game.playerCall(PlayerId.of("Julian")); game.playerCall(PlayerId.of("Julian"));
game.playerCall(PlayerId.of("Jona")); game.playerCall(PlayerId.of("Jona"));
game.dealFlop(); assertTrue(game.getCommunityCards().size() >= 3);
for (int i = 0; i < 10 && game.getCommunityCards().size() < 5; i++) {
game.playerCall(PlayerId.of("Julian")); game.playerCall(PlayerId.of("Julian"));
game.playerFold(PlayerId.of("Jona")); }
game.dealTurn(); assertEquals(5, game.getCommunityCards().size());
game.playerCall(PlayerId.of("Julian"));
game.dealRiver();
game.playerCall(PlayerId.of("Julian"));
List<Card> board = game.getCommunityCards(); List<Card> board = game.getCommunityCards();
@@ -378,13 +365,12 @@ public class GameControllerTest {
assertTrue(game.getState().getPot().getAmount() >= potBefore); assertTrue(game.getState().getPot().getAmount() >= potBefore);
game.dealFlop();
assertEquals(3, game.getCommunityCards().size()); assertEquals(3, game.getCommunityCards().size());
game.dealTurn(); game.playerCall(PlayerId.of("Julian"));
assertEquals(4, game.getCommunityCards().size()); assertEquals(4, game.getCommunityCards().size());
game.dealRiver(); game.playerCall(PlayerId.of("Mathis"));
assertEquals(5, game.getCommunityCards().size()); assertEquals(5, game.getCommunityCards().size());
Set<String> boardSeen = new HashSet<>(); Set<String> boardSeen = new HashSet<>();
@@ -462,13 +448,12 @@ public class GameControllerTest {
assertTrue(activePlayers >= 1, "At least one player must remain"); assertTrue(activePlayers >= 1, "At least one player must remain");
game.dealFlop(); assertTrue(game.getCommunityCards().size() >= 3);
assertEquals(3, game.getCommunityCards().size());
game.dealTurn(); for (int i = 0; i < 10 && game.getCommunityCards().size() < 5; i++) {
assertEquals(4, game.getCommunityCards().size()); game.playerCall(PlayerId.of("BigStack"));
}
game.dealRiver();
assertEquals(5, game.getCommunityCards().size()); assertEquals(5, game.getCommunityCards().size());
Set<String> allCards = new HashSet<>(); Set<String> allCards = new HashSet<>();