Ejemplo n.º 1
0
 def test_check_current_position_player1(self):
     # Arrange
     position = [0] * 12
     now_position = 0
     point = 3
     player = 1
     board = Board(position, '', '')
     # Act
     now_position = board.move_forward(point, now_position, player)
     # Assert
     current = board.check_current_position(player)
     self.assertEquals(3,current)
     # Act
     now_position = board.move_forward(point, now_position, player)
     # Assert
     current = board.check_current_position(player)
     self.assertEquals(6,current)
Ejemplo n.º 2
0
 def test_check_current_position_player2(self):
     # Arrange
     position = [0] * 12
     now_position = 11
     tmp = now_position
     point = 2
     player = 2
     board = Board(position, '', '')
     # Act
     now_position = board.move_forward(point, now_position, player)
     # Assert
     current = board.check_current_position(player)
     self.assertEquals(9,current)
     # Act
     now_position = board.move_forward(point, now_position, player)
     # Assert
     current = board.check_current_position(player)
     self.assertEquals(7,current)