Now so far I have writtin this:
public class caveLayout extends java.lang.Object{
/**
*
*/
private String name;
private int caveNumber;
private int adj1;
private int adj2;
private int adj3;
private boolean visited = false;
public caveLayout(String name, int caveNumber, int adj1, int adj2, int adj3) {
// TODO Auto-generated constructor stub
this.name = name;
this.caveNumber = caveNumber;
this.adj1 = adj1;
this.adj2 = adj2;
this.adj3 = adj3;
}
public String getCaveName(){
return name;
}
public int getCaveNumber(){
return caveNumber;
}
public int getAdjNumber(int room){
return 0;
}
public boolean hasBeenVisited(){
return visited;
}
public void setContents(){
}
public void markAsVisited(){
}
}
There are a few things that have puzzled me, example, how to determine is a location has been visited and how to get the adjecte from from a string of 4 ints (more like how to pass over the first one and proceed to the next)

New Topic/Question
Reply




MultiQuote




|