Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Class Room here.
- *
- */
- 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;
- }
- /**
- * Deklarasikan exit dari setiap ruangan.
- * @param north untuk exit north.
- * @param east untuk exit east.
- * @param south untuk exit south.
- * @param west untuk exit west
- *
- */
- 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;
- }
- }
- /**
- * @return Deskripsi dari room
- */
- public String getDescription()
- {
- return description;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment