Skip to content

Commit

Permalink
Update SubLobbyTest.java
Browse files Browse the repository at this point in the history
  • Loading branch information
Vmai711 authored May 2, 2024
1 parent bdda5b2 commit 85523e1
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/test/java/uta/cse3310/SubLobbyTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,20 @@ public void testAllPlayersReady() {
player1.setReady(true);
assertTrue(subLobby.allPlayersReady());
}

// Test if players in a lobby are assigned a color
public void testReassignColors() {

subLobby.addPlayer(player2);
subLobby.addPlayer(player3);
subLobby.addPlayer(player4);

subLobby.reassignColors(subLobby);

// Verify that each player has been assigned a color
assertEquals("blue", player1.getColor());
assertEquals("pink", player2.getColor());
assertEquals("green", player3.getColor());
assertEquals("orange", player4.getColor());
}
}

0 comments on commit 85523e1

Please sign in to comment.