edu.gatech.cs2335.lemmings.engine
Class LevelData

java.lang.Object
  extended byedu.gatech.cs2335.lemmings.engine.LevelData

public class LevelData
extends java.lang.Object

This class contains the data associated with a certain level. It is essentially your template to create playable levels.

Author:
Vladimir Urazov

Constructor Summary
LevelData()
          Creates a new LevelData instance.
 
Method Summary
 void addJob(java.lang.String idd, int num)
          Adds the number of jobs for the appropriate job id for the level.
 void addPortal(java.lang.String type, java.lang.String value)
          Describe addPortal method here.
 java.awt.Point getEntrancePoint()
          Get the value of entrancePoint.
 java.awt.Point getExitPoint()
          Get the value of exitPoint.
 java.lang.String getId()
          Access method for the id property.
 java.util.Map getJobMap()
          Returns the job map.
 java.lang.String getName()
          Access method for the name property.
 int getNumJobs(java.lang.String idd)
          Returns the number of jobs of the specified type for this level.
 int getNumLemmings()
          Access method for the numLemmings property.
 int getPercentToSave()
          Access method for the percentToSave property.
 java.util.List getPortals()
          Describe getPortals method here.
 java.awt.image.BufferedImage getThumbnail()
          Access method for the thumbnail property.
 long getTimeLimit()
          Access method for the timeLimit property.
 int getWaterLevel()
          Get the value of waterLevel.
 void setEntrancePoint(int x, int y)
          Set the value of entrancePoint.
 void setEntrancePoint(java.awt.Point v)
          Set the value of entrancePoint.
 void setExitPoint(int x, int y)
          Set the value of exitPoint.
 void setExitPoint(java.awt.Point v)
          Set the value of exitPoint.
 void setId(java.lang.String aId)
          Sets the value of the id property.
 void setJobMap(java.util.Map jm)
          Sets the job map
 void setName(java.lang.String aName)
          Sets the value of the name property.
 void setNumLemmings(int aNumLemmings)
          Sets the value of the numLemmings property.
 void setPercentToSave(int aPercentToSave)
          Sets the value of the percentToSave property.
 void setThumbnail(java.awt.image.BufferedImage aThumbnail)
          Sets the value of the thumbnail property.
 void setTimeLimit(long aTimeLimit)
          Sets the value of the timeLimit property.
 void setWaterLevel(int v)
          Set the value of waterLevel.
 java.lang.String toString()
          Returns the string representation of the level.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LevelData

public LevelData()
Creates a new LevelData instance.

Method Detail

getThumbnail

public java.awt.image.BufferedImage getThumbnail()
Access method for the thumbnail property.

Returns:
the current value of the thumbnail property

setThumbnail

public void setThumbnail(java.awt.image.BufferedImage aThumbnail)
Sets the value of the thumbnail property.

Parameters:
aThumbnail - the new value of the thumbnail property

getName

public java.lang.String getName()
Access method for the name property.

Returns:
the current value of the name property

setName

public void setName(java.lang.String aName)
Sets the value of the name property.

Parameters:
aName - the new value of the name property

getId

public java.lang.String getId()
Access method for the id property.

Returns:
the current value of the id property

setId

public void setId(java.lang.String aId)
Sets the value of the id property.

Parameters:
aId - the new value of the id property

getNumLemmings

public int getNumLemmings()
Access method for the numLemmings property.

Returns:
the current value of the numLemmings property

setNumLemmings

public void setNumLemmings(int aNumLemmings)
Sets the value of the numLemmings property.

Parameters:
aNumLemmings - the new value of the numLemmings property

getPercentToSave

public int getPercentToSave()
Access method for the percentToSave property.

Returns:
the current value of the percentToSave property

setPercentToSave

public void setPercentToSave(int aPercentToSave)
Sets the value of the percentToSave property.

Parameters:
aPercentToSave - the new value of the percentToSave property

getTimeLimit

public long getTimeLimit()
Access method for the timeLimit property.

Returns:
the current value of the timeLimit property

setTimeLimit

public void setTimeLimit(long aTimeLimit)
Sets the value of the timeLimit property.

Parameters:
aTimeLimit - the new value of the timeLimit property

getEntrancePoint

public java.awt.Point getEntrancePoint()
Get the value of entrancePoint.

Returns:
value of entrancePoint.

setEntrancePoint

public void setEntrancePoint(java.awt.Point v)
Set the value of entrancePoint.

Parameters:
v - Value to assign to entrancePoint.

setEntrancePoint

public void setEntrancePoint(int x,
                             int y)
Set the value of entrancePoint.

Parameters:
x - an int value
y - an int value

getExitPoint

public java.awt.Point getExitPoint()
Get the value of exitPoint.

Returns:
value of exitPoint.

setExitPoint

public void setExitPoint(java.awt.Point v)
Set the value of exitPoint.

Parameters:
v - Value to assign to exitPoint.

setExitPoint

public void setExitPoint(int x,
                         int y)
Set the value of exitPoint.

Parameters:
x - an int value
y - an int value

getWaterLevel

public int getWaterLevel()
Get the value of waterLevel.

Returns:
value of waterLevel.

setWaterLevel

public void setWaterLevel(int v)
Set the value of waterLevel. Note that -1 is a magic value which means there is no water on the level. Other negative numbers will be ABSed before application.

Parameters:
v - Value to assign to waterLevel.

addJob

public void addJob(java.lang.String idd,
                   int num)
Adds the number of jobs for the appropriate job id for the level.

Parameters:
idd - a String value
num - an int value

getNumJobs

public int getNumJobs(java.lang.String idd)
Returns the number of jobs of the specified type for this level.

Parameters:
idd - a String value
Returns:
an int value

getJobMap

public java.util.Map getJobMap()
Returns the job map.

Returns:
a Map value

setJobMap

public void setJobMap(java.util.Map jm)
Sets the job map

Parameters:
jm - , map of jobs to set

getPortals

public java.util.List getPortals()
Describe getPortals method here.

Returns:
a List value

addPortal

public void addPortal(java.lang.String type,
                      java.lang.String value)
Describe addPortal method here.

Parameters:
type - a String value
value - a String value

toString

public java.lang.String toString()
Returns the string representation of the level.

Returns:
a String value