Exemplo n.º 1
0
        public void UnexploredSquaresAreShownAsHashes()
        {
            // Given
            var minefield = Minefield.Empty(3, 2);
            // When
            var result = MinefieldRenderer.RenderMinefield(minefield);
            // Then
            var expected = " 123\nA###\nB###\n";

            Assert.AreEqual(expected, result);
        }
Exemplo n.º 2
0
        public void ExploredSquaresAreShownAsSpaces()
        {
            // Given
            var minefield = Minefield.Empty(3, 2).Explore(new Coordinates(0, 1));
            // When
            var result = MinefieldRenderer.RenderMinefield(minefield);
            // Then
            var expected = " 123\nA# #\nB###\n";

            Assert.AreEqual(expected, result);
        }