Beispiel #1
0
 public Room SetRoom(int x, int y, Room room)
 {
     Room tempRoom = null;
     if ((x >= 0 && x < Width) &&
         (y >= 0 && y < Height))
     {
         if (Rooms[(Width * y) + x] != null)
         {
             tempRoom = Rooms[(Width * y) + x];
         }
         Rooms[(Width * y) + x] = room;
     }
     return tempRoom;
 }
Beispiel #2
0
 public Map(int width, int height)
 {
     this.Width = width;
     this.Height = height;
     Rooms = new Room[this.Width * this.Height];
 }