/// <summary>
        /// Build the map.
        /// </summary>
        private void BuildMap()
        {
            // Create the map.
            map = new Map(width, height);

            map.Randomize(fillPercentage);

            for (int i = 0; i < 5; ++i)
            {
                map.Smooth();
            }

            map.AddBorder();

            // Create the control grid from the map.
            grid = new ControlSquareGrid(map, 1);
        }