from .Command import Command

class MoveCommand(Command):
    
    def __init__(self, player, target):
        self.player = player
        self.target = target
        self.previous = None

    def execute(self):
        self.previous = self.player.current
        self.player.current = self.target

    def undo(self):
        self.player.current = self.previous 