Class Map

java.lang.Object
  extended by 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)
           
 
Method Summary
 boolean allMonstersDead()
           
 void connectAllRooms()
           
static boolean connectRooms(Room r1, Room r2)
           
 void generateMaze()
           
 int getHeight()
           
 int getMaxMonsterArmorClass()
           
 int getMaxMonsterHitPoints()
           
 int getMaxMonsterSkill()
           
 int getMaxMonsterStrength()
           
 int getMaxWeaponDamageMod()
           
 Room getRoom(int i, int j)
           
 java.util.Vector getUnvisitedNeighbors(Room room)
           
 int getWidth()
           
 boolean isValidRoom(int i, int j)
           
static void main(java.lang.String[] args)
           
 void populate(int percentWeapon, int percentMonster)
           
 void setMaxMonsterArmorClass(int newMaxMonsterArmorClass)
           
 void setMaxMonsterHitPoints(int newMaxMonsterHitPoints)
           
 void setMaxMonsterSkill(int newMaxMonsterSkill)
           
 void setMaxMonsterStrength(int newMaxMonsterStrength)
           
 void setMaxWeaponDamageMod(int newMaxWeaponDamageMod)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Map

public Map(int cols,
           int rows,
           int seed)

Map

public Map(int cols,
           int rows)
Method Detail

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)