コード例 #1
0
 @Test
 public void each_player_is_assigned_a_different_colour()
     throws TooManyChipsException, TableFullException {
   Player[] players = new Player[8];
   for (int i = 0; i < 8; i++) {
     players[i] = new Player();
     rt.placeBet(players[i], 20, 100);
   }
   for (int i = 0; i < players.length - 1; i++)
     for (int j = i + 1; j < players.length; j++)
       assertTrue(rt.getColour(players[i]) != rt.getColour(players[j]));
 }
コード例 #2
0
 @Test
 public void each_player_is_assigned_a_different_colour() throws Exception {
   Player[] players = new Player[8];
   for (int i = 0; i < 8; i++) {
     players[i] = new Player();
     rt.placeBet(players[i], Field.forNumber(17), 100);
   }
   for (int i = 0; i < players.length - 1; i++)
     for (int j = i + 1; j < players.length; j++)
       assertTrue(
           i + ":" + rt.getColour(players[i]) + " == " + j + ":" + rt.getColour(players[j]),
           rt.getColour(players[i]) != rt.getColour(players[j]));
 }