def test_from_team_with_miss(self): presenter = TilePresenter.from_team( x=2, y=3, team=self.team2, game=self.game ) self.assertEqual(presenter.x, 2) self.assertEqual(presenter.y, 3) self.assertEqual(presenter.name, 'C3') self.assertTrue(presenter.is_empty) self.assertTrue(presenter.is_hit)
def test_from_team_with_hit_ship(self): presenter = TilePresenter.from_team( x=3, y=5, team=self.team2, game=self.game ) self.assertEqual(presenter.x, 3) self.assertEqual(presenter.y, 5) self.assertEqual(presenter.name, 'D5') self.assertFalse(presenter.is_empty) self.assertTrue(presenter.is_hit)
def test_from_team(self): presenter = TilePresenter.from_team( x=0, y=1, team=self.team2, game=self.game ) self.assertEqual(presenter.x, 0) self.assertEqual(presenter.y, 1) self.assertEqual(presenter.name, 'A1') self.assertTrue(presenter.is_empty) self.assertFalse(presenter.is_hit)