Beispiel #1
0
    def test_game_init(self):
        game = RockPaperScissorsGame(5, 'p1')
        self.assertEquals('p1', game.player_1)
        self.assertEquals(None, game.player_2)
        self.assertEquals((0, 0), game.scores)
        self.assertEquals(None, game.current_move)

        game.set_player_2('p2')
        self.assertEquals('p1', game.player_1)
        self.assertEquals('p2', game.player_2)
        self.assertEquals((0, 0), game.scores)
        self.assertEquals(None, game.current_move)
Beispiel #2
0
    def test_game_init(self):
        game = RockPaperScissorsGame(5, 'p1')
        self.assertEquals('p1', game.player_1)
        self.assertEquals(None, game.player_2)
        self.assertEquals((0, 0), game.scores)
        self.assertEquals(None, game.current_move)

        game.set_player_2('p2')
        self.assertEquals('p1', game.player_1)
        self.assertEquals('p2', game.player_2)
        self.assertEquals((0, 0), game.scores)
        self.assertEquals(None, game.current_move)
Beispiel #3
0
 def get_game(self, scores=None):
     game = RockPaperScissorsGame(5, 'p1')
     game.set_player_2('p2')
     if scores is not None:
         game.scores = scores
     return game
Beispiel #4
0
 def get_game(self, scores=None):
     game = RockPaperScissorsGame(5, 'p1')
     game.set_player_2('p2')
     if scores is not None:
         game.scores = scores
     return game