private bool CheckMovement() { ICellAction action = (ICellAction)player.Actions.Find(x => x.Name == "Walk"); ICell cell = map.GetAdjacentCell(player.X, player.Y, lastDirection); bool succ = action.Execute(cell); if (succ) { if (GameController.CurrentMap.CanMoveDownToNextLevel()) { GameController.ChangeLevel(true); succ = false; } else if (GameController.CurrentMap.CanMoveUpToPreviousLevel()) { GameController.ChangeLevel(false); succ = false; } } return(succ); }