massim.cowsimulations
Class GridSimulationCell
java.lang.Object
massim.gridsimulations.AbstractGridSimulationCell
massim.cowsimulations.GridSimulationCell
- All Implemented Interfaces:
- java.io.Serializable
public class GridSimulationCell
- extends AbstractGridSimulationCell
This class describes a single GridCell.
- See Also:
- Serialized Form
Method Summary |
boolean |
freeCell()
This method checks, if a cell is free to get in |
boolean |
freeCellforCow()
This method checks, if a cell is free to get in |
boolean |
isStable1()
|
boolean |
isStable2()
|
boolean |
noObject()
This method checks whether the cell contains an object or not. |
void |
setStable1(boolean stable1)
|
void |
setStable2(boolean stable2)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
cow
public boolean cow
fence
public boolean fence
open
public boolean open
switcher
public boolean switcher
canOpen
public boolean canOpen
cowturn
public int cowturn
agentTeam
public java.lang.String agentTeam
cowID
public java.lang.String cowID
GridSimulationCell
public GridSimulationCell()
noObject
public boolean noObject()
- This method checks whether the cell contains an object or not.
- Specified by:
noObject
in class AbstractGridSimulationCell
- Returns:
- Returns false, if cow, obstacle or agent is in the cell,
otherwise true.
freeCell
public boolean freeCell()
- This method checks, if a cell is free to get in
- Specified by:
freeCell
in class AbstractGridSimulationCell
- Parameters:
x
- Position x on the gridy
- Position y on the grid
- Returns:
- True in a such case, else false
freeCellforCow
public boolean freeCellforCow()
- This method checks, if a cell is free to get in
- Parameters:
x
- Position x on the gridy
- Position y on the grid
- Returns:
- True in a such case, else false
setStable1
public void setStable1(boolean stable1)
isStable1
public boolean isStable1()
setStable2
public void setStable2(boolean stable2)
isStable2
public boolean isStable2()
Copyright © 2011. All Rights Reserved.