Class Map
java.lang.Object
Map
public class Map
- extends java.lang.Object
Note that this documentation does NOT include the private fields
that you need to include in your Map class (rooms, visited, height,
width, maxMonsterStrength, maxMonsterSkill, maxMonsterHitPoints,
maxMonsterArmorClass, maxWeaponDamageMod, desc, and rand). These
fields were all in the skeleton code provided for the Map
class. For full details of the Map class, see HW J8. This
page does not include descriptions of the methods in the Map class;
they are included in more detail in the HW instead.
Constructor Summary |
Map(int cols,
int rows)
|
Map(int cols,
int rows,
int seed)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Map
public Map(int cols,
int rows,
int seed)
Map
public Map(int cols,
int rows)
getUnvisitedNeighbors
public java.util.Vector getUnvisitedNeighbors(Room room)
connectRooms
public static boolean connectRooms(Room r1,
Room r2)
connectAllRooms
public void connectAllRooms()
isValidRoom
public boolean isValidRoom(int i,
int j)
getHeight
public int getHeight()
getWidth
public int getWidth()
allMonstersDead
public boolean allMonstersDead()
getRoom
public Room getRoom(int i,
int j)
populate
public void populate(int percentWeapon,
int percentMonster)
generateMaze
public void generateMaze()
main
public static void main(java.lang.String[] args)
getMaxMonsterStrength
public int getMaxMonsterStrength()
setMaxMonsterStrength
public void setMaxMonsterStrength(int newMaxMonsterStrength)
getMaxMonsterSkill
public int getMaxMonsterSkill()
setMaxMonsterSkill
public void setMaxMonsterSkill(int newMaxMonsterSkill)
getMaxMonsterHitPoints
public int getMaxMonsterHitPoints()
setMaxMonsterHitPoints
public void setMaxMonsterHitPoints(int newMaxMonsterHitPoints)
getMaxMonsterArmorClass
public int getMaxMonsterArmorClass()
setMaxMonsterArmorClass
public void setMaxMonsterArmorClass(int newMaxMonsterArmorClass)
getMaxWeaponDamageMod
public int getMaxWeaponDamageMod()
setMaxWeaponDamageMod
public void setMaxWeaponDamageMod(int newMaxWeaponDamageMod)