from zerolife import * class Instruction(): def __init__(self, direction, species, coordinates=None): '''The optional coordinates parameter is for the pack method.''' self.direction = direction self.species = species self.coordinates = coordinates def pack(self, coords): '''Packs an instruction object with the coordinates given.''' return Instruction(self.direction, self.species,\ (coords[0]+self.direction[0], coords[1]+self.direction[1]))