public BaseTile Replace(int tileIndex, BaseTile newTile)
        {
            var old = baseTiles[tileIndex];

            baseTiles[tileIndex] = newTile;
            sorted.Tiles[old.SortedIndex]--;
            sorted.Tiles[newTile.SortedIndex]++;
            return(old);
        }
Example #2
0
 public Tile GetTile(BaseTile baseTile) => GetTile(GetTileId(baseTile.SortedIndex, 0));
Example #3
0
 public Tile(BaseTile baseTile, int id)
 {
     this.BaseTile = baseTile;
     this.Id       = id;
 }