game/Character/Player.cs
/// <summary>
/// Attempt to move on given coordinates.
/// </summary>
/// <param name="x">X coordinate of new position.</param>
/// <param name="y">Y coordinate of new position.</param>
/// <returns>True, if character was moved or false, if position is invalid.</returns>
Attempt to move on given coordinates.
Attempt to move on given coordinates .
private bool TryMove(int x, int y)
        {
            if (_world.IsValidCoords(x, y) && _world.TileMap[y, x] == Tile.Grass)
            {
                Position = (x, y);
                return true;
            }
            return false;
        }
private bool TryMove ( int x , int y ) { if ( _world . IsValidCoords ( x , y ) && _world . TileMap [ y , x ] == Tile . Grass ) { Position = ( x , y ) ; return true ; } return false ; }
Attempt to move on given coordinates.
Attempt to move on given coordinates .
True, if character was moved or false, if position is invalid.
True if character was moved or false if position is invalid .
x
int
X coordinate of new position.
X coordinate of new position .
y
int
Y coordinate of new position.
Y coordinate of new position .