Esempio n. 1
0
        private IBoardRules CreateBoardWithMinesRules()
        {
            //Generate Mines
            var minesEverywhere = GenerateMines.GenerateMineLocation(64, 8, 8);

            return(new BoardMineSweeperRules(new Board(GenerateHorizontalArray.HorizontalChessArray(8), 8, minesEverywhere)));
        }
Esempio n. 2
0
        public void TwoMinesGeneratedOk()
        {
            var resultList = GenerateMines.GenerateMineLocation(2, 2, 2);

            Assert.AreEqual(2, resultList.Count);
        }
Esempio n. 3
0
 public void NumberOfMinesExceedsAvailableSquares()
 {
     Assert.Throws <ArgumentException>(() => GenerateMines.GenerateMineLocation(2, 1, 1));
 }