Untitled

 avatar
unknown
plain_text
3 years ago
8.3 kB
2
Indexable

import java.util.Scanner;
public class ZeroNine {

  public static void main(String[] args) {
   
   Scanner sc = new Scanner (System.in);
   char start , choice1 ; int choice , choice2 , order;
   char rep = 0 ;
   String username;
   
   
   System.out.println("                Welcome!");
    System.out.println("----------------------------------------");
     System.out.println("P \n E \n  O \n   P \n    L \n     E \n      S's  ");
      System.out.println("        C H O I C E \n                   C \n                    O \n                     R \n                      O \n                       N \n                        A");
       System.out.println("                          S P R E A D ");
         System.out.println("\n \n \n-----------------------------------------\n");
       
      System.out.println("------------------------------------------");
       System.out.println("Before we start , what's your name? ");
        System.out.print("You: ");
         username=sc.nextLine();
          System.out.println("------------------------------------------");
     
             System.out.println("Do you want to start the game "+username + "?" + " \n(Yes- Y No - N)");
              System.out.print(username + ":");
               start=sc.next().charAt(0);
                System.out.println("------------------------------------------");
   
   if (start=='y' || start =='Y')
       {
         System.out.println("\n \n*you died because of corona virus... \n \n");
          System.out.println("*you woke up at a hotel in Wuhan,China... \n \n ");
         System.out.println("-------------------------------------------");
      
      do {
        
        System.out.println("What do you want to do? ");
           System.out.println("1. Sleep again ");
            System.out.println("2. go outside ");
             System.out.println("3. look around the room ");
              System.out.print(username+ ":");
               choice=sc.nextInt(); 
                System.out.println("---------------------------------------- \n ");
            
        
        
        switch (choice)
        {
         case 1:  
         System.out.println("*you slept again..\n");
         System.out.println("*after an hour, you woke up \n");
        
         System.out.println("-------------------------------------------\n");
         System.out.println("Do you want to do other things? ");
         System.out.println("Y-yes N-no ");
         System.out.print(username+ ":");
         rep=sc.next().charAt(0);
         System.out.println("\n------------------------------------------\n");
         
         break;
       
         case 2:
         System.out.println("*you walked towards the door\n");
         System.out.println("*You opened it \n");
         System.out.println("*You looked around and suddenly saw a store \n");
         
          System.out.println(" ---------------------------");
        System.out.println("||  PUMMY      进来!        ||");
        System.out.println("|                           |");
        System.out.println("|       YANIKI              |");
        System.out.println("|                STORE      |");
          System.out.println(" ---------------------------");
        System.out.println("\nYou are having second thoughts, \nare you still going to eat there? ");
        System.out.println("Y-yes N-no ");
        System.out.print(username+ ":");
        choice1=sc.next().charAt(0);
        System.out.println("-------------------------------------------\n");
        
        if (choice1=='y' || choice1=='Y')
        {
          System.out.println("*You entered the store \n");
          System.out.println("*You saw the available foods \n");
          System.out.println("1.BAT SOUP \n2.SIOMAI RAT \n3.FRIED DOG \n");
          System.out.println("-----------------------------------------");
          System.out.println("*The person in charge at the store asked ");
          System.out.println("your order ");
          System.out.print(username+":");
          order=sc.nextInt();
          System.out.println("-----------------------------------------");
          
          if (order==1)
          {
            System.out.println("*Your order is cooking,just wait a minute! \n");
            System.out.println("* A FEW MINUTES LATER * \n");
            System.out.println("*Your order is here! \n \n");
            System.out.println("*You STARTED TO EAT your food \n\n ");
            System.out.println("*After you finished eating,\n");
            System.out.println("you returned back to your home.\n  ");
            System.out.println("---------------------------------------- \n");
            System.out.println(" *Weeks Later, you STARTED COUGHING..\n");            
          }
         else if (order==2)
         {          
           System.out.println("*Your order is cooking,just wait a minute! \n");
            System.out.println("* A FEW MINUTES LATER * \n");
            System.out.println("*Your order is here! \n \n");
            System.out.println("*You STARTED TO EAT your food \n\n ");
            System.out.println("*After you finished eating,\n");
            System.out.println("you returned back to your home.\n  ");
            System.out.println("----------------------------------------- \n");                                               
              }
         else if (order==3)
         {
           System.out.println("*Your order is cooking,just wait a minute! \n");
            System.out.println("* A FEW MINUTES LATER * \n");
            System.out.println("*Your order is here! \n \n");
            System.out.println("*You STARTED TO EAT your food \n\n ");
            System.out.println("*After you finished eating,\n");
            System.out.println("you returned back to your home.\n  ");
            System.out.println("------------------------------------------\n");           
                                                             
        
         }
        }
        
        
           
    System.out.println("-------------------------------------------");
    
  
         break;
         
         
         
         case 3:
         System.out.println("*You looked around the room \n");
         System.out.println("*You saw a flat screen TV \n");         System.out.println("*and an underwear of a man \n");
         System.out.println("----------------------------------------");
         System.out.println("What do you want to do? ");
         System.out.println("1. Open the TV");
         System.out.println("2. Sniff the underwear");
         System.out.print(username+ ":");
         choice2=sc.nextInt();
         System.out.println("----------------------------------------");
         
         if (choice2==1)
         {
           System.out.println("*You opened the TV \n");
           System.out.println("*Breaking news!! \n");
           System.out.println("*~~ A man dated an e girl(with a dig bick) \n");
           System.out.println("he's now a homophobic person.~~* \n");
           System.out.println("--------------------------------------");
           System.out.println("Do you want to do other things? ");
           System.out.println("Y-yes N-no ");
           System.out.print(username+ ":");
           rep=sc.next().charAt(0);
           
         }
         
         else if (choice2==2)
         {
           System.out.println("*sniffs* *sniffs* \n");
           System.out.println("*It smells bad \n ");
           System.out.println("---------------------------------------");
           System.out.println("Do you want to do other things? ");
           System.out.println("Y-Yes N-no ");
           System.out.print(username+":");
           rep=sc.next().charAt(0);
         }
         
         else 
         {
           System.out.println("Invalid, pls re-run ");
         }
         
         break;
        
         }            
        
      }
      
      
      while (rep=='y');
      
      
      
        }

  else if (start =='n' ||start=='N')    
          { 
         System.out.println("You should at least give it a try,\ngoodbye. :> \n \n                  ( -_・) ︻デ═一 ▸ ");
          }
       
       
       else {
         System.out.println("Uhuh, pls re-run");
       } 
   
   
   
   
  }
 }