예제 #1
0
 def test_turn_water(self):
     board = Board()
     board.set_boat(3, 3, 4, "vertical")
     result = board.shoot(1, 2)
     continue_turn = board.turn_decision_hit(result)
     self.assertFalse(continue_turn)
예제 #2
0
 def test_there_are_boats(self):
     board = Board()
     board.set_boat(1, 1, 1, "vertical")
     self.assertTrue(board.there_are_boats())
     board.shoot(1, 1)
     self.assertFalse(board.there_are_boats())
예제 #3
0
 def test_turn_hit(self):
     board = Board()
     board.set_boat(3, 3, 4, "vertical")
     result = board.shoot(4, 3)
     continue_turn = board.turn_decision_hit(result)
     self.assertTrue(continue_turn)