<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">/*
******************
   ROOM CLASS

******************

The purpose of the Room class is to item and exit information for
every room (aka cave) in the map.

The exits available in each room can be north, south, east or west.
Every exit joins to an imaginary corridor which can take you to any
room on the map.  Thus each exit will lead to another room, and this
is specified by an integer, the room ID (see the Map.class for room IDs).
These room IDs are stored in variables that represent the four exit
directions.

Items in the room are stored in an ItemList

Note: The room ID is just the index of the map array used to keep track
of rooms.

*/

class Room
{
   public int north, east, south, west;
   public ItemList Items;
   private final int NO_EXIT = 255;

   // Default Constructor
   public Room()
   {
      north = NO_EXIT;
      south = NO_EXIT;
      east = NO_EXIT;
      west = NO_EXIT;
      Items = new ItemList();
   }

   // Constructor
   public Room(int rnorth, int reast, int rsouth, int rwest)
   {
      north = rnorth;
      south = rsouth;
      east = reast;
      west = rwest;
      Items = new ItemList();
   }

   // Constructor
   public Room(int rnorth, int reast, int rsouth, int rwest, ItemList ritems)
   {
      north = rnorth;
      south = rsouth;
      east = reast;
      west = rwest;
      Items = ritems;
   }
}
</pre></body></html>