public void ShouldGetTile() { var tile = _mapTileMapTileBoard.GetTile(2, 3); Assert.AreEqual(2, tile.X); Assert.AreEqual(3, tile.Y); // unassigned tile type Assert.AreEqual(null, tile.TileType); }
public void ShouldConstructBoardWithPredefinedTileTypeMapping() { Enum[,] mapTileType = { { TestingTileType.Wall, TestingTileType.Wall, TestingTileType.Wall, TestingTileType.Wall }, { TestingTileType.Wall, TestingTileType.Water, TestingTileType.Water, TestingTileType.Wall }, { TestingTileType.Wall, TestingTileType.Water, TestingTileType.Water, TestingTileType.Wall }, { TestingTileType.Wall, TestingTileType.Wall, TestingTileType.Wall, TestingTileType.Wall } }; _mapTileMapTileBoard = new MapTileMapTileBoard(mapTileType); Assert.AreEqual(4, _mapTileMapTileBoard.Size.X); Assert.AreEqual(4, _mapTileMapTileBoard.Size.Y); Assert.AreEqual(TestingTileType.Wall, _mapTileMapTileBoard.GetTile(0, 0).TileType); Assert.AreEqual(TestingTileType.Water, _mapTileMapTileBoard.GetTile(1, 1).TileType); Assert.AreEqual(TestingTileType.Wall, _mapTileMapTileBoard.GetTile(3, 3).TileType); }