class AcShootAt(Action): def __init__(self, robot, dest, stype, strike): Action.__init__(self, robot) aturn = AcTurn(robot, dest-robot['k.position']) ashoot = AcShoot(robot, stype, strike) self._action = SequenceAction(robot, [aturn, ashoot]) def update(self, god, intv): return self._action.update(god, intv)
def __init__(self, robot, dest, stype, strike): Action.__init__(self, robot) aturn = AcTurn(robot, dest-robot['k.position']) ashoot = AcShoot(robot, stype, strike) self._action = SequenceAction(robot, [aturn, ashoot])