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)
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())
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)