Ejemplo n.º 1
0
 def test_find_ship_vertical(self):
     base = SeaField(5, 5)
     SeaPlayground.put_ship(base, 1, 1, 3, True)
     assert base.find_ship_by_cells(1, 2) == {(1, 1), (1, 2), (1, 3)}
Ejemplo n.º 2
0
 def test_find_abcent(self):
     base = SeaField(5, 5)
     assert base.find_ship_by_cells(1, 2) == set()
Ejemplo n.º 3
0
 def test_find_ship(self):
     base = SeaField(5, 5)
     SeaPlayground.put_ship(base, 1, 1, 3)
     assert base.find_ship_by_cells(2, 1) == {(1, 1), (2, 1), (3, 1)}