Beispiel #1
0
        public void GetTilesReturnsEmptyListIfNoMatchingTiles()
        {
            var board = new Board(builder);
            var tiles = board.GetResourceTiles(13);

            Assert.Equal(new ITile[0], tiles);
        }
Beispiel #2
0
        public void GetTilesTest()
        {
            var board = new Board(builder);
            var tiles = board.GetResourceTiles(4);

            Assert.Equal(2, tiles.Count());
            Assert.Equal(new[] { MaterialType.Lumber, MaterialType.Brick }, tiles.Select(t => t.Rawmaterial));
        }
Beispiel #3
0
        public void GetTilesIgnoresRobberTiles()
        {
            var board = new Board(builder);
            board.Robber.Move(board.Tiles.Single(t => t.X == 0 && t.Y == 0));
            var tiles = board.GetResourceTiles(11);

            Assert.Equal(1, tiles.Count());
            Assert.Equal(new[] { MaterialType.Lumber }, tiles.Select(t => t.Rawmaterial));
        }