public void Move(Coordinate direction) { if (CanMove(player, direction) == true) { MovePlayer(direction); } else if (WhatIsAt(player.NextPos(direction)) == Actor.Box || WhatIsAt(player.NextPos(direction)) == Actor.BoxGoal) { Box box = WhichBox(player.NextPos(direction)); if (CanMove(box, direction) == true) { MoveBox(box, direction); UpdateBoard(box); MovePlayer(direction); } } }