Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Class ini menampilkan lokasi game yang menghubungkan satu room dengan room
- * lain dengan pintu keluar.
- * Ada pintu keluar north, east, south, dan west.
- * @author Thomas Felix
- * @version 23 November 2020
- */
- public class Room
- {
- public String description;
- public Room northExit;
- public Room southExit;
- public Room eastExit;
- public Room westExit;
- public Room(String description)
- {
- this.description = description;
- }
- public void setExits(Room north, Room east, Room south, Room west)
- {
- if (north != null)
- {
- northExit = north;
- }
- if (east != null)
- {
- eastExit = east;
- }
- if (south != null)
- {
- southExit = south;
- }
- if (west != null)
- {
- westExit = west;
- }
- }
- public String getDescription()
- {
- return description;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement