public bool TryPlayerMove(Direction direction) { (int dx, int dy) = direction.GetDeltas(); int targetX = Player.X + dx; int targetY = Player.Y + dy; if (WorldMap.Contains(targetX, targetY) && Player.CanPlaceOnTile(WorldMap[targetX, targetY])) { var currentCreature = Creatures[targetX, targetY]; if (currentCreature is null || currentCreature == Player) { // Open position Creatures[Player.X, Player.Y] = null; SetPlayerPosition(targetX, targetY); Tick((GameInput)((int)GameInput.PlayerMoveUp + (int)direction)); return(true); } } return(false); }