Esempio n. 1
0
File: Map.cs Progetto: Zolomon/Crawl
 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;
 }
Esempio n. 2
0
File: Map.cs Progetto: Zolomon/Crawl
 public Map(int width, int height)
 {
     this.Width = width;
     this.Height = height;
     Rooms = new Room[this.Width * this.Height];
 }