Exemplo n.º 1
0
 public BoardFactory(LegalBoardValidator legalBoardValidator, BlankTileIndexFinder blankTileIndexFinder,
                     MisplacedTilesCounter misplacedTilesCounter, TilesShuffler tilesShuffler)
 {
     this.legalBoardValidator   = legalBoardValidator;
     this.blankTileIndexFinder  = blankTileIndexFinder;
     this.misplacedTilesCounter = misplacedTilesCounter;
     this.tilesShuffler         = tilesShuffler;
 }
Exemplo n.º 2
0
        public void ValidateShuffle()
        {
            List <Tile>   original = Enumerable.Range(0, 24).Select(value => new Tile(value)).ToList();
            List <Tile>   shuffled = new List <Tile>(original);
            TilesShuffler shuffler = new TilesShuffler();

            shuffler.Shuffle(shuffled);
            Assert.NotEqual(original, shuffled);
        }