예제 #1
0
 def test_get_player_disc_colour_player_1_is_xs_2_players(self):
     """Player 1 is Xs"""
     game = Game("1")
     game.game = {"players": ["robin", "brian"]}
     disc = game.get_player_disc_colour("robin")
     self.assertEqual("x", disc)
예제 #2
0
 def test_get_player_disc_colour_player_2_is_ys_2_players(self):
     """Player 2 is Ys"""
     game = Game("1")
     game.game = {"players": ["robin", "brian"]}
     disc = game.get_player_disc_colour("brian")
     self.assertEqual("o", disc)
예제 #3
0
 def test_get_player_disc_colour_player_1_is_xs_no_player_2(self):
     """Test with one player, 2nd player hasn't joined yet"""
     game = Game("1")
     game.game = {"players": ["john"]}
     disc = game.get_player_disc_colour("john")
     self.assertEqual("x", disc)