Пример #1
0
        public override void BuildRoom(int roomNum)
        {
            Room room = new Room(roomNum);

            room.SetSide(/*Direction.North, new Wall()*/);
            room.SetSide(/*Direction.South, new Wall()*/);
            room.SetSide(/*Direction.East, new Wall()*/);
            room.SetSide(/*Direction.West, new Wall()*/);

            _currentMaze.AddRoom(room);
        }
Пример #2
0
        public void BuildRoom(int n)
        {
            if (this.maze.RoomNo(n) != null)
            {
                throw new Exception("room already presented");
            }

            var room = new Room(n);

            room.SetSide(Direction.North, new Wall());
            room.SetSide(Direction.East, new Wall());
            room.SetSide(Direction.South, new Wall());
            room.SetSide(Direction.West, new Wall());

            this.maze.AddRoom(room);
        }
Пример #3
0
        public override void BuildDoor(int n1, int n2)
        {
            Room r1 = _currentMaze.GetRoom(n1);
            Room r2 = _currentMaze.GetRoom(n2);

            Door door = new Door(r1, r2);

            r1.SetSide(/*CommonWall(r1,r2), door*/);
            r2.SetSide(/*CommonWall(r2,r1), door*/);
        }