/// <summary>
 /// Sets a tile on the tileboard.
 /// </summary>
 /// <param name="x">X coordinate of the tile</param>
 /// <param name="y">Y coordinate of the tile</param>
 /// <param name="tile">Tile info</param>
 public void SetTile(int x, int y, UITileBoardTile tile)
 {
     if (!Size.Contains(x, y))
     {
         return;
     }
     Tiles[x, y] = tile;
     Page.UI.Invalidate();
 }
        /// <summary>
        /// Clears/fills the tileboard with the specified tile.
        /// </summary>
        /// <param name="tile">The tile to draw everywhere on the board</param>
        public void Clear(UITileBoardTile tile)
        {
            int x, y;

            for (x = 0; x < Tiles.GetLength(0); x++)
            {
                for (y = 0; y < Tiles.GetLength(1); y++)
                {
                    Tiles[x, y] = tile;
                }
            }

            Page.UI.Invalidate();
        }
 /// <summary>
 /// Sets a tile on the tileboard.
 /// </summary>
 /// <param name="position">Coordinates of the tile</param>
 /// <param name="tile">Tile info</param>
 public void SetTile(Position position, UITileBoardTile tile)
 {
     SetTile(position.X, position.Y, tile);
 }