Using PartialFunctions in move method.