예제 #1
0
        public void OutOfBoundsTile_GetTileOutSideMap_ReturnsTileWithImpassableWall()
        {
            TileMap map = new TileMap(new Size(0, 0));
            XmasEntity actual = map[0, 1].Entities.First();

            Assert.IsInstanceOf<ImpassableWall>(actual);
        }
예제 #2
0
        public void OutOfBoundsWallChunk_RequestBuildWallOutsideMap_ReturnWallNotBuilt()
        {
            TileMap map = new TileMap(new Size(0, 0));
            //map.AddChunk<Wall> (new Point (1, 1), new Point (1, 1));
            XmasEntity actual = map[1, 1].Entities.First();

            Assert.IsInstanceOf<ImpassableWall>(actual);
        }
예제 #3
0
        public void MisplacedWallChunk_RequestBuildWallOnUnit_ReturnWallNotBuilt()
        {
            TileMap map = new TileMap(new Size(0, 0));

            map[0, 0].AddEntity(new Player());
            //map.AddChunk<Wall> (new Point (0, 0), new Point (0, 0));

            Assert.That(map[0, 0].Entities, Has.Some.InstanceOf<Player>());
            Assert.That(map[0, 0].Entities, Has.None.InstanceOf<ImpassableWall>());
        }
예제 #4
0
 public TileWorld(TileMap map)
 {
     this.map = map;
 }
예제 #5
0
 public TileWorld(Size burstSize)
 {
     this.map = new TileMap(burstSize);
 }