07-28-2013, 04:21 PM
Hello! I am creating my own game in java. I want to have it so it gives you choices and if you say left, there is a different option for it than if you typed right. When the first line of code pops up in the console, I can type, the same for second and the third, but when I want to type Left I can't type anything. Here is my code. Also I am using Eclipse. The same program that BrandonioProductions uses. Also you probably know his youtube is but here it is anyways. <!-- w --><a class="postlink" href="http://www.youtube.com/user/BrandonioProductions">www.youtube.com/user/BrandonioProductions</a><!-- w -->
========================================================
import java.util.Scanner;
public class Island {
static Scanner sc = new Scanner(System.in);
public static void main(String[] args) throws InterruptedException{
System.out.println("You awake to find yourself on an island in the middle of the sea.");
Thread.sleep(3000);
System.out.println("You then walk around the island, in which you find two paths.");
Thread.sleep(3000);
System.out.println("Choose from the left cobble path, or the right class path.");
}
public String message;
public Island() {
if (message.equals("Left"));
System.out.println("You then walk down the left path.");
}
}
========================================================
import java.util.Scanner;
public class Island {
static Scanner sc = new Scanner(System.in);
public static void main(String[] args) throws InterruptedException{
System.out.println("You awake to find yourself on an island in the middle of the sea.");
Thread.sleep(3000);
System.out.println("You then walk around the island, in which you find two paths.");
Thread.sleep(3000);
System.out.println("Choose from the left cobble path, or the right class path.");
}
public String message;
public Island() {
if (message.equals("Left"));
System.out.println("You then walk down the left path.");
}
}