public Arrangement(IEnumerable <int> tileCounts, IEnumerable <Block> blocks)
        {
            Blocks = blocks.ToList();

            TileCounts = tileCounts.ToList();

            var h = 0;

            foreach (var c in TileCounts.Reverse())
            {
                h         *= 5;
                h         += c;
                TileCount += c;
            }

            Base5Hash = h;
        }
Exemple #2
0
 private TileCounts CalculateTileCounts(List<char> bag)
 {
     var tileCounts = new TileCounts();
     tileCounts.Calculate(bag);
     return tileCounts;
 }