org.simbrain.world.odorworld
Class Wall

java.lang.Object
  extended by org.simbrain.world.odorworld.AbstractEntity
      extended by org.simbrain.world.odorworld.Wall

public class Wall
extends AbstractEntity

Wall represents a wall in the world.

Author:
Ryan Bartley

Constructor Summary
Wall()
          Default wall constructor.
Wall(OdorWorld parentWorld)
          Creates a wall in OdorWorld.
 
Method Summary
 int getBites()
          Return the bites.
 int getBitesToDie()
          Return the bites to die.
 boolean getEdible()
          Return the edible.
 int getHeight()
          Return the height.
 Point getLocation()
          Return the location.
 OdorWorld getParent()
          Return the parent world.
 Rectangle getRectangle()
          Return the rectangle.
 Rectangle getRectangle(Point p)
          Return the rectangle at the point.
 double getResurrectionProb()
          Return the resurrectin probability.
 Stimulus getStimulus()
          Return the stimulus.
 int getWidth()
          Return the width.
 int getX()
          Return the x.
 int getY()
          Return the y.
 void paintThis(Graphics g)
          Implements abstract paintThis() from AbstractEntity.
 void setBites(int bites)
          Sets the bites.
 void setBitesToDie(int bitesToDie)
          Sets the bites to die.
 void setEdible(boolean edible)
          Sets the edible.
 void setHeight(int height)
          Sets the height.
 void setParent(OdorWorld world)
          Sets the parent world.
 void setResurrectionProb(double resurrectionProb)
          Sets the resurrection probability.
 void setStimulus(Stimulus theStimulus)
          Sets the stimulus.
 void setWidth(int width)
          Sets the widht.
 void setX(int x)
          Sets the x.
 void setY(int y)
          Sets the y.
 void terminate()
          Terminates an object that is edible.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Wall

public Wall()
Default wall constructor.


Wall

public Wall(OdorWorld parentWorld)
Creates a wall in OdorWorld.

Parameters:
parentWorld - Current world
Method Detail

getResurrectionProb

public double getResurrectionProb()
Return the resurrectin probability.

Specified by:
getResurrectionProb in class AbstractEntity
Returns:
the resurrection probability

setResurrectionProb

public void setResurrectionProb(double resurrectionProb)
Sets the resurrection probability.

Specified by:
setResurrectionProb in class AbstractEntity
Parameters:
resurrectionProb - Resurrection probability value

getHeight

public int getHeight()
Return the height.

Specified by:
getHeight in class AbstractEntity
Returns:
the height

getWidth

public int getWidth()
Return the width.

Specified by:
getWidth in class AbstractEntity
Returns:
the width

getX

public int getX()
Return the x.

Specified by:
getX in class AbstractEntity
Returns:
the x

getY

public int getY()
Return the y.

Specified by:
getY in class AbstractEntity
Returns:
the y

setHeight

public void setHeight(int height)
Sets the height.

Parameters:
height - The height

setWidth

public void setWidth(int width)
Sets the widht.

Parameters:
width - The width

setX

public void setX(int x)
Sets the x.

Specified by:
setX in class AbstractEntity
Parameters:
x - The x

setY

public void setY(int y)
Sets the y.

Specified by:
setY in class AbstractEntity
Parameters:
y - The y

getRectangle

public Rectangle getRectangle()
Return the rectangle.

Specified by:
getRectangle in class AbstractEntity
Returns:
the rectangle

getParent

public OdorWorld getParent()
Return the parent world.

Specified by:
getParent in class AbstractEntity
Returns:
the parent world

setParent

public void setParent(OdorWorld world)
Sets the parent world.

Specified by:
setParent in class AbstractEntity
Parameters:
world - The parent world

paintThis

public void paintThis(Graphics g)
Implements abstract paintThis() from AbstractEntity.

Specified by:
paintThis in class AbstractEntity
Parameters:
g - the world graphics object

getRectangle

public Rectangle getRectangle(Point p)
Return the rectangle at the point.

Specified by:
getRectangle in class AbstractEntity
Parameters:
p - Point
Returns:
the rectangle at the point

getStimulus

public Stimulus getStimulus()
Return the stimulus.

Specified by:
getStimulus in class AbstractEntity
Returns:
the stimulus

setStimulus

public void setStimulus(Stimulus theStimulus)
Sets the stimulus.

Parameters:
theStimulus - The stimulus

getLocation

public Point getLocation()
Return the location.

Specified by:
getLocation in class AbstractEntity
Returns:
the location

getBitesToDie

public int getBitesToDie()
Return the bites to die.

Specified by:
getBitesToDie in class AbstractEntity
Returns:
the bites to die

setBitesToDie

public void setBitesToDie(int bitesToDie)
Sets the bites to die.

Parameters:
bitesToDie - The bies to die

getEdible

public boolean getEdible()
Return the edible.

Specified by:
getEdible in class AbstractEntity
Returns:
the edible

setEdible

public void setEdible(boolean edible)
Sets the edible.

Specified by:
setEdible in class AbstractEntity
Parameters:
edible - The edible

getBites

public int getBites()
Return the bites.

Specified by:
getBites in class AbstractEntity
Returns:
the bites

setBites

public void setBites(int bites)
Sets the bites.

Specified by:
setBites in class AbstractEntity
Parameters:
bites - The bites

terminate

public void terminate()
Terminates an object that is edible.

Specified by:
terminate in class AbstractEntity