| /* Class: AdvMotionTableEntry */ | |
| /** | |
| * This class is used to store a single entry in the motion table. | |
| */ | |
| public class AdvMotionTableEntry { | |
| /* Constructor: AdvMotionTableEntry(dir, room, key) */ | |
| /** | |
| * Creates a new motion table entry. | |
| * | |
| * @param dir The string specifying the direction of motion | |
| * @param room The number of the destination room | |
| * @param key The name of the object used as a key, or null if none | |
| */ | |
| public AdvMotionTableEntry(String dir, int room, String key) { | |
| direction = dir.toUpperCase(); | |
| destinationRoom = room; | |
| String roomnum = Integer.toString(room); | |
| keyName = (key == null) ? null : key.toUpperCase(); | |
| } | |
| /* Method: getDirection() */ | |
| /** | |
| * Returns the direction name from a motion table entry. | |
| * | |
| * @return The string specifying the direction of motion | |
| */ | |
| public String getDirection() { | |
| return direction; | |
| } | |
| /* Method: getDestinationRoom() */ | |
| /** | |
| * Returns the room number to which a particular direction leads. | |
| * | |
| * @return The number of the destination room | |
| */ | |
| public int getDestinationRoom() { | |
| return destinationRoom; | |
| } | |
| /* Method: getKeyName() */ | |
| /** | |
| * Returns the name of the object required for travel along a locked | |
| * passage, or null if the passage is always available. | |
| * | |
| * @return The name of the object used as a key, or null if none | |
| */ | |
| public String getKeyName() { | |
| return keyName; | |
| } | |
| /* Private instance variables */ | |
| private String direction; | |
| private int destinationRoom; | |
| private String keyName; | |
| } | |
Xet Storage Details
- Size:
- 1.48 kB
- Xet hash:
- e889b0d72c6060de6677d6d91719845053e3360470f5b40491c432569c9024f6
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.