This can be used to Test your Program :
---------------------------------------
public class Driver
{
public static void main(String[] args)
{
Dungeon theD = new Dungeon();
System.out.println("~~OUTPUT 1:~~");
Ghost ghost1 = new Ghost("Ghost1", Monster.MonsterType.GHOST, 1,1, theD);
Goblin goblin1 = new Goblin("Goblin1", Monster.MonsterType.GOBLIN, 1, 0, theD);
Zombie zombie1 = new Zombie("Zombie1", Monster.MonsterType.ZOMBIE, 2,1, theD);
System.out.println(theD.toString());
System.out.println("~~OUTPUT 2:~~");
goblin1.moveNorth(theD);
System.out.println(theD.toString());
System.out.println("~~OUTPUT 3:~~");
Ghost ghost2 = new Ghost("Ghost2", Monster.MonsterType.GHOST,1,3, theD);
System.out.println(theD.toString());
System.out.println("~~OUTPUT 4:~~");
ghost2.moveSouth(theD);
System.out.println(theD.toString());
System.out.println("~~OUTPUT 5:~~");
ghost2.moveSouth(theD);
System.out.println(theD.toString());
System.out.println("~~OUTPUT 6:~~");
Goblin goblin2 = new Goblin("Goblin2", Monster.MonsterType.GOBLIN, 1,1,theD);
System.out.println(theD.toString());
System.out.println("~~OUTPUT 7:~~");
zombie1.moveWest(theD);
System.out.println(theD.toString());
System.out.println("~~OUTPUT 8:~~");
goblin1.moveEast(theD);
System.out.println(theD.toString());
System.out.println("~~OUTPUT 9:~~");
goblin2.moveEast(theD);
System.out.println(theD.toString());
System.out.println("~~OUTPUT 10:~~");
ghost1.moveNorth(theD);
System.out.println(theD.toString());
System.out.println("~~OUTPUT 11:~~");
ghost2.moveSouth(theD);
System.out.println(theD.toString());
}
}
No comments:
Post a Comment