[boolean choice1 = false;
boolean choice2 = false;
int teacher;
int student;
public Random generator = new Random();
int chance;
/**
* Create the game and initialise its internal map.
*/
public Game()
{
charactergen();
createRooms();
parser = new Parser();
}
/**
* Create all the rooms and link their exits together.
*/
public void charactergen(){
chance = generator.nextInt(2);
if(chance==1)
{
System.out.println("You are a teacher at Covenant Day School.");
choice1 = true;
}
if(chance == 2)
{
System.out.println("You are a student at Covenant Day School.");
choice2 = true;
}
}
private void printWelcome()
{
System.out.println();
System.out.println("Welcome to DERPY Zork");
System.out.println("Developed by: :Sfmort");
System.out.println("Programmed by: :Sfmort");
System.out.println("Design by: :Sfmort");
System.out.println("Idea by: :Sfmort");
System.out.println("");
System.out.println("Type 'help' if you need help.");
System.out.println("You are in the " + currentRoom +".");
}
]
This post has been edited by modi123_1: 27 April 2012 - 08:09 AM
Reason for edit:: please use code tags

New Topic/Question
Reply



MultiQuote






|