Assignment #Project

Code

///Name: Conner Wygaerts
///Period: 6
///Project Name: LongAdventure
///File Name: LongAdventure.java
///Date Finished: 11/18/15

    import java.util.Scanner;

public class LongAdventure
{
    public static void main(String[] args)
    {
        Scanner keyboard = new Scanner(System.in);
        
        String choiceA, choiceA1, choiceA1a, choiceA1b, choiceA2, choiceA2a, choiceA2b, choiceA3, choiceA3a, choiceA3b;
        
        System.out.println("Lets Begin the Adventure!");
        System.out.println();
        
        System.out.println("You wake up in the woods in the middle of no where. You see a path that leads to a cave. Would you like to go down the \"path\", \"cave\", or deeper into the \"forest\"?");
        choiceA = keyboard.next();
        System.out.println();
        
        if (choiceA.equals("path"))
        {
            System.out.println("You continue the along the path until you reach a split. you can only go left or right. You choose \"left\" or \"right\".");
            choiceA1 = keyboard.next();
            System.out.println();
            
            if (choiceA1.equals("left"))
            {
                System.out.println("You see a bear as your walking. Do you continue walking or freak out? (\"yes\" or \"freak out\")");
                choiceA1a = keyboard.next();
                System.out.println();
                
                if (choiceA1a.equals("yes"))
                {
                    System.out.println("You are passing by the bear and he eats you. You die because you got eaten by a bear.");
                }
                
                else if (choiceA1a.equals("freak out"))
                {
                    System.out.println("You try to turn back but your lost ! You eventually die of starvation.");
                }
                
                else
                    System.out.println("SOme how you survive and become prosperous.");
            }
            
            else if (choiceA1.equals("right"))
            {
                System.out.println("One day you see a hiker walking by. True or False? (\"True\" or \"False\")");
                choiceA1b = keyboard.next();
                System.out.println();
                
                if (choiceA1b.equals("True"))
                {
                    System.out.println("You and your newly discovered friend become best friends and live on.");
                }
                
                else if (choiceA1b.equals("False"))
                {
                    System.out.println("You should have said yes, it would have been a way to find home.");
                }
                
                else
                    System.out.println("That is not a destination.");
            }
            
            else
                System.out.println("That is not a destination.");
        }
        
        else if (choiceA.equals("hut"))
        {
            System.out.println("You find a old bag. Do open it or kick it? \"open\" or \"kick it\"?");
            choiceA2 = keyboard.next();
            System.out.println();
            
            if (choiceA2 == "open")
            {
                System.out.println("as you open the bag you relaize its human bones do you continue or no? (\"continue\" or \"no\")");
                choiceA2a = keyboard.next();
                System.out.println();
                
                if (choiceA2a.equals("continue"))
                {
                   System.out.println("You open the bag and a rattlesnake jumps out and bites you. You die a slow and aginizing death."); 
                }
                
                else if (choiceA2a.equals("no"))
                {
                    System.out.println("Good choice. You put the bag down and keep on living.");
                }
                
                else
                    System.out.println("That is not a destination.");
            }
            
            else if (choiceA2.equals("kick it "))
            {
                System.out.println("you begin to kick the bag. then you realize what your doing do you stop or kick it? (\"stop\" or \"kick it\")");
                choiceA2b = keyboard.next();
                System.out.println();
                
                if (choiceA2b.equals("stop"))
                {
                    System.out.println("good choice the bones are made out of concrete and would have broken your toes if you didnt stop .");
                }
                
                else if (choiceA2b.equals("kick it"))
                {
                    System.out.println("Congradualations you have now broken all your toes because you kicked the bag that was filled with fake concrete bones.");
                }
                
                else
                    System.out.println("That is not a destination.");
            }
            
            else
                System.out.println("That is not a destination.");
        }
        
        else if (choiceA.equals("forest"))
        {
            System.out.println("In the forest you go for a walk do you go down the \"hill\" or up the \"mountain\"?");
            choiceA3 = keyboard.next();
            System.out.println();
            
            if (choiceA3.equals("hill"))
            {
               System.out.println("While your walking down you slip, do you catch yourself (\"yes\" or \"no\")"); 
                choiceA3a = keyboard.next();
                System.out.println();
                
                if (choiceA3a.equals("yes"))
                {
                    System.out.println("Congradulations your cordinated enough to catch yourself.");
                }
                
                else if (choiceA3a.equals("no"))
                {
                    System.out.println("you dont put your arms out and you fall on your face.");
                }
                
                else
                    System.out.println("That is not a destination.");
            }
            
            else if (choiceA3 == "mountain")
            {
                System.out.println("You begin to climb the huge mountain. Do you (\"climb\" to the top or \"no\")");
                choiceA3b = keyboard.next();
                System.out.println();
                
                if (choiceA3b.equals("climb"))
                {
                    System.out.println("You enjoy a nice hike and once you get to the top you look around and its the most spectacular view youve ever seen in your life. It was well worth the climb.");
                }
                
                else if (choiceA3b.equals("no"))
                {
                    System.out.println("You miss out on the best view of your life time.");
                }
                
                else
                    System.out.println("That is not a destination.");
            }
            
            else
                System.out.println("That is not a destination.");
        }
        
        else
            System.out.println("That is not a destination.");
    }
}

Picture of the output

YourInitials.html