Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Random;
- import java.util.Scanner;
- /*
- * IDEAS FOR MY GAME
- *
- */
- public class Main {
- static Scanner s = new Scanner(System.in);
- static Random r = new Random();
- static String ui, name;
- static boolean loop = true;
- public static void main(String[] args) throws InterruptedException{
- System.out.println("[P]lay\n[Q]uit");
- ui = s.nextLine().toLowerCase();
- while(loop == true){
- if(ui.equals("p")){
- intro();
- }else if(ui.equals("q")){
- System.out.println("Game stopped.");
- loop = false;
- }else{
- System.out.println("Please enter P or Q.");
- ui = s.nextLine().toLowerCase();
- }
- }
- }
- public static void intro() throws InterruptedException{
- System.out.println("\nYou wake up laying in a bed.\n");
- Thread.sleep(2500);
- System.out.println("Ellie: Hey, are you okay?");
- Thread.sleep(2000);
- System.out.println("Ellie: What is your name?");
- System.out.print("Enter your name: ");
- name = s.nextLine();
- System.out.println("Ellie: " + name + ", huh? I see.");
- Thread.sleep(2000);
- System.out.println("Ellie: My name is Ellie. Nice to meet you.");
- Thread.sleep(2500);
- System.out.println(name + ": What is going on? Why am I here? Ow, my head hurts!");
- Thread.sleep(3000);
- System.out.println("Ellie: I found you unconscious in a forest. I brought you here.");
- Thread.sleep(3000);
- System.out.println(name + ": I can't remember anything besides my name.");
- Thread.sleep(2700);
- System.out.println("Ellie: That's quite odd.");
- Thread.sleep(2000);
- System.out.println(name + ": Well, thank you for taking care of me. I will be leaving now.");
- Thread.sleep(3000);
- System.out.println("Ellie: Okay, please come back if you need anything.");
- Thread.sleep(3000);
- elliesHome();
- }
- public static void elliesHome(){
- System.out.println("\nYou are in Ellie's home.");
- System.out.println("Options: [T]alk, [E]xit");
- ui = s.nextLine().toLowerCase();
- while(loop == true){
- if(ui.equals("t")){
- }else if(ui.equals("e")){
- }else{
- System.out.println("Please enter T or E.");
- ui = s.nextLine().toLowerCase();
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment