def remove_cell(self, cell): """Remove a map cell from the path and return it.""" if not self.has_cell(cell): raise error.GameMapError("The cell is not in the path.") return self.cells.pop(self.cells.index(cell))
def add_cell(self, cell): """Add a map cell to the path.""" if self.has_cell(cell): raise error.GameMapError("The cell is already in the path.") self.cells.append(cell)
def remove_artifact(self, artifact): """Removes the interface from the map cell""" if artifact not in self.artifacts: raise error.GameMapError( "The artifact is not assigned to the map cell.") return self.artifacts.pop(self.artifacts.index(artifact))
def remove_part(self, part): """Removes the interface from the map cell""" if part not in self.parts: raise error.GameMapError( "The part is not assigned to the map cell.") return self.parts.pop(self.parts.index(part))
def add_artifact(self, artifact): """Adds a tool to the map cell.""" if artifact in self.artifacts: raise error.GameMapError( "The artifact is already assigned to the map cell.") self.artifacts.append(artifact)
def add_part(self, part): """Adds a tool to the map cell.""" if part in self.parts: raise error.GameMapError( "The part is already assigned to the map cell.") self.parts.append(part)
def remove_tool(self, tool): """Removes the interface from the map cell""" if tool not in self.tools: raise error.GameMapError( "The tool is not assigned to the map cell.") return self.tools.pop(self.tools.index(tool))
def add_tool(self, tool): """Adds a tool to the map cell.""" if tool in self.tools: raise error.GameMapError( "The tool is already assigned to the map cell.") self.tools.append(tool)
def remove_device(self, device): """Removes the interface from the map cell and returns it.""" if device not in self.interfaces: raise error.GameMapError( "The device is not assigned to the map cell.") return self.devices.pop(self.devices.index(device))
def add_device(self, device): """Adds an interface to the map cell.""" if device in self.devices: raise error.GameMapError( "The device is already assigned to the map cell.") self.devices.append(device)