manlyMiniGames.Map.Map C# (CSharp) Method

Map() public method

public Map ( ) : System
return System
        public Map()
        {
            // Create the 2D grid which will store the map data.
            grid = new UInt16[mapWidth, mapHeight];

            //Create borders around the map
            for (int y = 0; y < mapHeight; y++)
            {
                grid[0, y] = 1;
                grid[mapWidth - 1, y] = 1;
            }

            for (int x = 0; x < mapWidth; x++)
            {
                grid[x, 0] = 1;
                grid[x, mapHeight - 1] = 1;
            }
        }