Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.company;
- import java.util.Scanner;
- public class Main {
- public static void main(String[] args) {
- Scanner keyboard = new Scanner(System.in);
- //Prompting the user
- System.out.println ("Welcome to the Zombie Escape Simulator! Would you like to start off in the city, suburbs, or rural area? Enter 'city', 'suburbs', or 'rural'");
- String city = keyboard.nextLine();
- if (city == city)
- {
- System.out.println ("You wake up from your apartment and you see zombies outside. Do you sleep it away or do you prepare for battle? Enter 'sleep' or 'prepare'");
- String sleep = keyboard.nextLine();
- String prepare = keyboard.nextLine();
- if (sleep.equalsIgnoreCase(prepare))
- if (prepare.equalsIgnoreCase (sleep))
- if (sleep == sleep) {
- System.out.println("You chose to sleep. The zombies entered your apartment and swallowed you whole. The end.");
- }
- {
- if (prepare == prepare){
- System.out.println("You gear up, and you make a break for it, but the dead are everywhere. Do you run for the alley or fight in the street? Enter 'alley' or 'fight'");
- String alley = keyboard.nextLine();
- String fight = keyboard.nextLine();
- if (alley == alley) {
- System.out.println("You run through the alley and you see someone pull around in a van and tells you to get inside. Do you join, or do you run? Enter 'join', or 'run'");
- }
- {
- if (fight == fight) {
- System.out.println ("You literally fight to death and you do no make it. The end.");
- {
- }
- if (alley.equalsIgnoreCase(fight))
- if (fight.equalsIgnoreCase(alley));
- }
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement