def reset(self): for ship in Ship.SHORT_NAMES: s = Ship(0, 0, ship, False) self.update(s, [0] * s.get_size())
def add_ship(self, x, y, ship, vertical): '''Add a new ship, or change orientation of existing ship.''' s = Ship(x, y, ship, vertical) return self.add(s)