Guest User

Untitled

a guest
Jun 23rd, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.15 KB | None | 0 0
  1. private void createRooms()
  2. {
  3. Room outside, entrance, firstStairs, kitchen, livingRoom, bathroom, bedroom1, bedroom2, bedroom3;
  4.  
  5. // Haunted House's Rooms
  6. outside = new Room("You are standing outside an old manor house with a rusty gate, paint peeling off the wood and with bats fly from the chimney");
  7. entrance = new Room("You walk through the rusty door into the manor house, there are only candles for light");
  8. firstStairs = new Room("You go up the stairs and end up on the landing - there are floor boards missing");
  9. kitchen = new Room("You go into the kitchen, all the appliances are missing");
  10. livingRoom = new Room("You enter the living room - there is a small black and white tv");
  11. bathroom = new Room("You enter the smelly bathroom");
  12. bedroom1 = new Room("You enter the first bedroom - there is a locked cupboard, there is nothing else in the room");
  13. bedroom2 = new Room("In the second bedroom there is a large bed full of spiders, you hear a noise knocking on the smashed window");
  14. bedroom3 = new Room("As you enter the third bedroom the door slams shut. There is blood on the walls and a huge hole on the floor.");
  15.  
  16. // initialise room exits
  17. outside.setExit("north", entrance);
  18.  
  19.  
  20. entrance.setExit("south", outside);
  21. entrance.setExit("north", firstStairs);
  22. entrance.setExit("west", kitchen);
  23. entrance.setExit("east", livingRoom);
  24.  
  25.  
  26. livingRoom.setExit("west", entrance);
  27.  
  28. kitchen.setExit("east", entrance);
  29.  
  30. firstStairs.setExit("north", bathroom);
  31. firstStairs.setExit("south", bedroom1);
  32. firstStairs.setExit("east", bedroom2);
  33. firstStairs.setExit("west", bedroom3);
  34.  
  35. bathroom.setExit("south", firstStairs);
  36. bedroom1.setExit("north", firstStairs);
  37. bedroom2.setExit("west", firstStairs);
  38. bedroom3.setExit("east", firstStairs);
  39.  
  40.  
  41. currentRoom = outside; // start game outside
  42.  
  43. outside.addItem("Gun", new item("Gun", "Shooting Zombies in their brains, it's the only way to kill them!", 20));
  44. entrance.addItem("a crate", new item("a crate", "Nothing inside, but might be useful?", 70));
  45. firstStairs.addItem("knife", new item("knife", "You could open things with this. Or stab zombies!", 20));
  46. kitchen.addItem("sink", new item("sink", "You could throw it.", 50));
  47. livingRoom.addItem("grenade", new item("grenade", "Throwing at zombies, kaaaboooom!", 25));
  48. bathroom.addItem("blood drenched coat", new item("blood drenched coat", "It's a disguise!! Become a zombie and they might not eat your brains with beans...", 3));
  49. bedroom1.addItem("grenade", new item("grenade", "Throwing at zombies, kaaaboooom!", 25));
  50. bedroom2.addItem("sledge hammer", new item("sledge hammer", "If swung properly, can knock the brain right out if the zombie keeping their skull in tact!!", 25));
  51. bedroom3.addItem("magic wand", new item("magic wand", "Is it voodoo? No. It's a toy... or is it?!", 1));
  52.  
  53.  
  54. }
Add Comment
Please, Sign In to add comment