|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectPrintGame.CreateLabyrinth
class representing a two dimensional labyrinth
Field Summary | |
protected boolean |
build_angle_
|
protected int |
build_loop_
|
protected boolean |
build_places_
|
protected boolean |
build_tree_
|
protected int |
col_
|
protected LabyrinthField |
labyrinth_field_
|
protected int |
loops_
|
protected int |
max_col_
the max number of cols max_col_=cols-1 |
protected int |
max_loops_
|
protected int |
max_row_
the max number of rows max_row_=rows-1 |
protected int |
max_way_lenght_
|
protected int |
min_way_lenght_
|
protected boolean |
new_point_
|
protected int |
num_diamonds_
the number of diamonds distributed in the field (set from outside of the class with the appropriate method-calls |
protected int |
num_way_cells_
the number of way cells distributed in the field (set from outside of the class with the appropriate method-calls |
protected java.util.Random |
random_generator_
|
protected RandomWayCoordinates |
randomwaycoordinates_
|
protected int |
row_
|
protected Direction |
way_direction_
|
protected int |
way_lenght_
|
Constructor Summary | |
CreateLabyrinth(LabyrinthField labyrinth_field)
Standard constructor |
Method Summary | |
void |
calculateWays()
|
protected int |
getIntRandomValue(int min,
int max)
|
LabyrinthField |
getLabyrinthField()
|
void |
setBuildAngles(int build_angle)
|
void |
setBuildLoops(int build_loop)
|
void |
setBuildPlaces(int build_place)
|
void |
setBuildTrees(int build_tree)
|
void |
setDiamonds()
|
void |
setMaxWayLenght(int max_way_lenght)
|
void |
setMinWayLenght(int min_way_lenght)
|
void |
setNumDiamonds(int num_diamonds)
method called from the outside to set the number of diamonds distributed in this labyrinthfield. |
void |
setNumWayCells(int num_way_cells)
method called from the outside to set the number of way cells distributed in this labyrinthfield. |
java.lang.String |
toString()
standard toString method for debugging |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected int num_diamonds_
protected int num_way_cells_
protected int max_row_
protected int max_col_
protected boolean build_angle_
protected boolean build_tree_
protected int build_loop_
protected boolean build_places_
protected int min_way_lenght_
protected int max_way_lenght_
protected int max_loops_
protected int loops_
protected LabyrinthField labyrinth_field_
protected java.util.Random random_generator_
protected RandomWayCoordinates randomwaycoordinates_
protected int row_
protected int col_
protected int way_lenght_
protected Direction way_direction_
protected boolean new_point_
Constructor Detail |
public CreateLabyrinth(LabyrinthField labyrinth_field)
java.lang.IllegalArgumentException
- thrown if either rows or cols
is < 0Method Detail |
public void setNumDiamonds(int num_diamonds) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
- thrown if the number of mines
is < 0public void setNumWayCells(int num_way_cells) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
- thrown if the number of way cells
is < 0public void setMinWayLenght(int min_way_lenght) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
public void setMaxWayLenght(int max_way_lenght) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
public void setBuildAngles(int build_angle) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
public void setBuildTrees(int build_tree) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
public void setBuildPlaces(int build_place) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
public void setBuildLoops(int build_loop) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
protected int getIntRandomValue(int min, int max) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
public void calculateWays()
public void setDiamonds()
public LabyrinthField getLabyrinthField()
public java.lang.String toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |