コード例 #1
0
ファイル: test_board.py プロジェクト: chaowarat/zumo-game
 def test_get_real_dice_no_crash_12(self):
     # Arrange
     position = [0] * 12
     player = 2
     dice = 2
     p1_name = 'Med'
     p2_name = 'Tor'
     board = Board(position, p1_name, p2_name)
     # Act
     value = board.get_real_dice(player, dice)
     # Assert
     self.assertEqual(dice, value)
コード例 #2
0
ファイル: test_board.py プロジェクト: chaowarat/zumo-game
 def test_get_real_dice_no_crash_same1(self):
     # Arrange
     position = [0] * 12
     player = 1
     dice = 2
     p1_name = 'Bin'
     p2_name = 'Bin'
     board = Board(position, p1_name, p2_name)
     # Act
     value = board.get_real_dice(player, dice)
     # Assert
     self.assertEqual(dice+1, value)
コード例 #3
0
ファイル: test_board.py プロジェクト: chaowarat/zumo-game
 def test_get_real_dice_crash_12(self):
     # Arrange
     position = [0] * 12
     position[5] = 1
     position[6] = 2        
     player = 2
     dice = 2
     p1_name = 'Med'
     p2_name = 'Tor'
     board = Board(position, p1_name, p2_name)
     # Act
     value = board.get_real_dice(player, dice)
     # Assert
     self.assertTrue(value == 0 or value == dice)
コード例 #4
0
ファイル: test_board.py プロジェクト: chaowarat/zumo-game
 def test_get_real_dice_crash_5(self):
     # Arrange
     position = [0] * 12
     position[5] = 1
     position[6] = 2         
     player = 1
     dice = 2
     p1_name = 'Med'
     p2_name = 'Bin'
     board = Board(position, p1_name, p2_name)
     # Act
     value = board.get_real_dice(player, dice)
     # Assert
     self.assertEqual(dice, value)
コード例 #5
0
ファイル: test_board.py プロジェクト: chaowarat/zumo-game
 def test_get_real_dice_crash_same1(self):
     # Arrange
     position = [0] * 12
     position[5] = 1
     position[6] = 2        
     player = 1
     dice = 2
     p1_name = 'Bin'
     p2_name = 'Bin'
     board = Board(position, p1_name, p2_name)
     # Act
     value = board.get_real_dice(player, dice)
     # Assert
     self.assertTrue(value == dice+1)