Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import javax.swing.*;
- import javax.swing.text.*;
- public class roomList// holds all room descriptions
- {
- public static void build(Room[][] room, int x, int y)
- {
- for (int i = 0; i < x; i++)
- {
- for (int j = 0; j < y; j++)
- {
- room[i][j] = new Room(i, "", "", null);
- }
- }
- room[0][0].setNumber(1);
- room[0][0].setName("Living Room");
- room[0][0].setDescription("You are in your living room.");
- // room[0][0].setItems("wallet");
- // room[0][0].setItems("remote");
- room[0][1].setNumber(2);
- room[0][1].setName("Bedroom");
- room[0][1].setDescription("You are in your bedroom. Your closet is slightly ajar.");
- // room[0][1].setItems("keys");
- // room[0][1].setItems("flashlight");
- room[1][0].setNumber(3);
- room[1][0].setName("Kitchen");
- room[1][0].setDescription("You are in your kitchen.");
- // room[1][0].setItems("pop tarts");
- // room[1][0].setItems("soda");
- room[1][1].setNumber(4);
- room[1][1].setName("Bathroom");
- room[1][1].setDescription("You are in your bathroom.");
- // room[1][1].setItems("toilet paper");
- // room[1][1].setItems("magazine");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement