manlyMiniGames.Map.Grid C# (CSharp) Method

Grid() private method

Returns the grid at the relative position with bounds checking
private Grid ( int x, int y ) : UInt16
x int X coordinate
y int Y coordinate
return System.UInt16
        private UInt16 Grid(int x, int y)
        {
            if (x >= 0 && x < mapWidth &&
                y >= 0 && y < mapHeight)
                return grid[x, y];

            //All tiles stored outside of the map are empty
            return 0;
        }