Advertisement
Thanateros

Untitled

Apr 11th, 2015
241
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.21 KB | None | 0 0
  1. import javax.swing.*;
  2. import javax.swing.text.*;
  3. public class roomList// holds all room descriptions
  4. {
  5. public static void build(Room[][] room, int x, int y)
  6. {
  7. for (int i = 0; i < x; i++)
  8. {
  9. for (int j = 0; j < y; j++)
  10. {
  11. room[i][j] = new Room(i, "", "", null);
  12. }
  13. }
  14.  
  15. room[0][0].setNumber(1);
  16. room[0][0].setName("Living Room");
  17. room[0][0].setDescription("You are in your living room.");
  18. // room[0][0].setItems("wallet");
  19. // room[0][0].setItems("remote");
  20.  
  21. room[0][1].setNumber(2);
  22. room[0][1].setName("Bedroom");
  23. room[0][1].setDescription("You are in your bedroom. Your closet is slightly ajar.");
  24. // room[0][1].setItems("keys");
  25. // room[0][1].setItems("flashlight");
  26.  
  27. room[1][0].setNumber(3);
  28. room[1][0].setName("Kitchen");
  29. room[1][0].setDescription("You are in your kitchen.");
  30. // room[1][0].setItems("pop tarts");
  31. // room[1][0].setItems("soda");
  32.  
  33. room[1][1].setNumber(4);
  34. room[1][1].setName("Bathroom");
  35. room[1][1].setDescription("You are in your bathroom.");
  36. // room[1][1].setItems("toilet paper");
  37. // room[1][1].setItems("magazine");
  38. }
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement