dsun

sfd

Nov 8th, 2013
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.16 KB | None | 0 0
  1. import java.util.Random;
  2. import java.util.Scanner;
  3.  
  4. /*
  5. * IDEAS FOR MY GAME
  6. *
  7. */
  8. public class Main {
  9.  
  10. static Scanner s = new Scanner(System.in);
  11. static Random r = new Random();
  12. static String ui, name;
  13. static boolean loop = true;
  14.  
  15. public static void main(String[] args) throws InterruptedException{
  16. System.out.println("[P]lay\n[Q]uit");
  17. ui = s.nextLine().toLowerCase();
  18.  
  19. while(loop == true){
  20. if(ui.equals("p")){
  21. intro();
  22. }else if(ui.equals("q")){
  23. System.out.println("Game stopped.");
  24. loop = false;
  25. }else{
  26. System.out.println("Please enter P or Q.");
  27. ui = s.nextLine().toLowerCase();
  28. }
  29. }
  30. }
  31.  
  32. public static void intro() throws InterruptedException{
  33. System.out.println("\nYou wake up laying in a bed.\n");
  34. Thread.sleep(2500);
  35. System.out.println("Ellie: Hey, are you okay?");
  36. Thread.sleep(2000);
  37. System.out.println("Ellie: What is your name?");
  38. System.out.print("Enter your name: ");
  39. name = s.nextLine();
  40. System.out.println("Ellie: " + name + ", huh? I see.");
  41. Thread.sleep(2000);
  42. System.out.println("Ellie: My name is Ellie. Nice to meet you.");
  43. Thread.sleep(2500);
  44. System.out.println(name + ": What is going on? Why am I here? Ow, my head hurts!");
  45. Thread.sleep(3000);
  46. System.out.println("Ellie: I found you unconscious in a forest. I brought you here.");
  47. Thread.sleep(3000);
  48. System.out.println(name + ": I can't remember anything besides my name.");
  49. Thread.sleep(2700);
  50. System.out.println("Ellie: That's quite odd.");
  51. Thread.sleep(2000);
  52. System.out.println(name + ": Well, thank you for taking care of me. I will be leaving now.");
  53. Thread.sleep(3000);
  54. System.out.println("Ellie: Okay, please come back if you need anything.");
  55. Thread.sleep(3000);
  56. elliesHome();
  57. }
  58.  
  59. public static void elliesHome(){
  60. System.out.println("\nYou are in Ellie's home.");
  61. System.out.println("Options: [T]alk, [E]xit");
  62. ui = s.nextLine().toLowerCase();
  63.  
  64. while(loop == true){
  65. if(ui.equals("t")){
  66.  
  67. }else if(ui.equals("e")){
  68.  
  69. }else{
  70. System.out.println("Please enter T or E.");
  71. ui = s.nextLine().toLowerCase();
  72. }
  73. }
  74. }
  75.  
  76.  
  77. }
Advertisement
Add Comment
Please, Sign In to add comment