I am writing it in eclipse and i was wondering weather i could simplify it by not having to repeat each line after each line. Also if it is possible to step back a level after you die, or have it take you further forward into the game by skipping some steps.
System.out.println("You have woken up on an island and see a river to your right and a jungle to you left."+"\n"+"Type right to go to the river, or type left to go to the jungle,");
choice =user_in.nextLine();
if(choice.equals("right")){
System.out.println("You come to the river, but the edge is unstable and you fall in and get washed away."+"\n"+"THE END.");
} else if(choice.equals("left")){
System.out.println("You have come to the jungle. You do see an old path going throught the jungle, a path going around to the left to a town and one to the right heading for the mountain."+"\n"+"Type jungle to go through the jungle, or town to go to the left, or right to go to the mountain.");}
else {System.out.println("That was not valid");
}
choice =user_in.nextLine();
if(choice.equals("right")){
System.out.println("You walk towards the mountain and see an old tunnel to the left there is also a path to the right heading up over the mountain."+"\n"+"If you wish to go over the pass and brave the storms type right but if you choose to go into the tunnel type left");
} else if(choice.equals("left")){
System.out.println("As you walk towards the town you see it has strong defences and lots of guards, you call out to them but all they answer with is a cloud of arrows."+"\n"+"THE END");}
else if(choice.equals("jungle")){
System.out.println("You walk along this path for some time until you spot a small camp off in the distance."+"\n"+"If you wish to enter the camp type camp, but if you wish to keep on walking on the path pass the camp, type path.");}
else {System.out.println("That was not valid");
}
choice =user_in.nextLine();
I would also like to have items that i could have in an inventory as such and weapons, not sure if this is possible or not.
Also i would like to know how to export this, i'm not sure what file you could export this and what is involved.
thankyou

New Topic/Question
Reply



MultiQuote








|