StringGo,Food,Leftovers,Eat;// a new string needs to be added for each new choice
System.out.println(" WELCOME TO STUDENT LIFE");
System.out.println(" ");
System.out.println(" This is the start of your university adventure, it's feshers week and you've just met your flatmates for the first time and they suggest going for a drink to get to know eachother, do you go for the 'drink' or stay home and 'unpack'? ");
System.out.print("> ");
Go=keyboard.next();
if(Go.equalsIgnoreCase("drink")){
System.out.println("You're now drunk but happy you've made friends with your flatmates, -20. ");
money=money-20;
System.out.println(""+money);
System.out.println("You're walking home and see a takeaway sign glowing in the night, do you go to the 'takeaway' or walk home and brave the 'leftovers' from the food you made earlier?");
System.out.print("> ");
Food=keyboard.next();
if(Food.equalsIgnoreCase("takeaway")){
System.out.println("You enter the takeaway and have the choice between 'pizza' or a 'kebab', which do you choose?");
System.out.print("> ");
Eat=keyboard.next();
if(Eat.equalsIgnoreCase("pizza")){
System.out.println(" ");
System.out.println("You feel full up and content in your drunk state, - 10.");//after these choices are made the game will progress to the next segment that can be seen as "next choice" at the bottom, this is where you copy, paste, edit and repeat the segment process
money=money-10;
System.out.println(""+money);
}elseif(Eat.equalsIgnoreCase("kebab")){
System.out.println(" ");
System.out.println("You feel full up and content in your drunk state, - 5.");
money=money-5;
System.out.println(""+money);
}
}elseif(Food.equalsIgnoreCase("leftovers")){
System.out.println("The leftovers in the fridge look edible even for your cooking, do you 'eat' the food or go to 'bed'?");
System.out.print("> ");
Leftovers=keyboard.next();
if(Leftovers.equalsIgnoreCase("eat")){
System.out.println(" ");
System.out.println("You go to bed full, having spent nothing on takeaway but happy that you socialised");
}elseif(Leftovers.equalsIgnoreCase("bed")){
System.out.println(" ");
System.out.println("You go to bed hungry and looking forward to a big breakfast, having spent nothing on takeaway, but happy that you socilaised");
}
}
}
//I've added this below to edit and uncomment for the unpack scenario
// if (Go.equalsIgnoreCase("unpack")) {
// System.out.println(" ");
// money = money - 20;
// System.out.println("" + money);
// System.out.println("You're walking home and see a takeaway sign glowing in the night, do you go to the 'takeaway' or walk home and brave the 'leftovers' from the food you made earlier?");
// System.out.print("> ");
// Food = keyboard.next();
//
// if (Food.equalsIgnoreCase("takeaway")) {
// System.out.println("You enter the takeaway and have the choice between 'pizza' or a 'kebab', which do you choose?");
// System.out.print("> ");
// Eat = keyboard.next();
//
// if (Eat.equalsIgnoreCase("pizza")) {
// System.out.println(" ");
// System.out.println("You feel full up and content in your drunk state, - 10.");
// money = money - 10;
// System.out.println("" + money);
// } else if (Eat.equalsIgnoreCase("kebab")) {
// System.out.println(" ");
// System.out.println("You feel full up and content in your drunk state, - 5.");
// money = money - 5;
// System.out.println("" + money);
// }
// } else if (Food.equalsIgnoreCase("leftovers")) {
// System.out.println("The leftovers in the fridge look edible even for your cooking, do you 'eat' the food or go to 'bed'?");
// System.out.print("> ");
// Leftovers = keyboard.next();
//
// if (Leftovers.equalsIgnoreCase("eat")) {
// System.out.println(" ");
// System.out.println("You go to bed full, having spent nothing on takeaway but happy that you socialised");
// } else if (Leftovers.equalsIgnoreCase("bed")) {
// System.out.println(" ");
// System.out.println("You go to bed hungry and looking forward to a big breakfast, having spent nothing on takeaway, but happy that you socilaised");