/// <summary> /// Fills grid with tiles. /// </summary> /// <param name="grid">The empty grid.</param> public void InitilizeGrid(IGrid grid) { var emptyTile = new Tile(string.Empty, GlobalConstants.TotalTilesCount - 1, TileType.Empty); for (int i = 0; i < GlobalConstants.TotalTilesCount - 1; i++) { Tile tile = emptyTile.CloneMemberwise(); tile.Label = (i + 1).ToString(); tile.Position = i; tile.Type = TileType.Number; grid.AddTile(tile); } grid.AddTile(emptyTile); }