class SpecialOrder(Order, metaclass=ABCMeta):
"""All special orders inherit from this order."""
@classmethod
def execute(cls, bot):
raise NotImplementedError()
class Forward(Order):
forward_constant = 1
@classmethod
def execute(cls, bot):
bot.move_forward(cls.forward_constant)
class ForwardTwice(Forward):
forward_constant = 2
class Rotate(Order):
rotate_constant = 1
@classmethod
def execute(cls, bot):
bot.rotate(cls.rotate_constant)