|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--sid.Simulation
Constructor Summary | |
Simulation()
Creates a new instance of Simulation |
|
Simulation(int nX,
int nY)
Creates a new instance of Simulation |
|
Simulation(int nA,
int nB,
int nX,
int nY)
Creates a new instance of Simulation |
Method Summary | |
void |
endSim()
metodo utilizzato per richiede la fine di una simulazione: gli agenti verranno cosė terminati utilizzando il centro di tuple per comunicarglielo |
int[][] |
getMineFieldMatrix()
restituisce la matrice contenente il campo minato |
int |
getTotMines()
|
int |
getTotUnminedMines()
|
boolean |
isSimEnded()
|
void |
nextTurn()
consente di passare al turno successivo della simulazione |
boolean |
removeMine(int x,
int y)
metodo utilizzato per rimuovere una mina dal tc mineField |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Simulation() throws java.lang.Exception
public Simulation(int nX, int nY) throws java.lang.Exception
nX
- numero di caselle sull'asse XnY
- numero di caselle sull'asse Ypublic Simulation(int nA, int nB, int nX, int nY) throws java.lang.Exception
nA
- numero di agenti tipo A (vedono mine) da crearenB
- numero agenti tipo B (disinnescano mine) da crearenX
- numero di caselle sull'asse XnY
- numero di caselle sull'asse YMethod Detail |
public boolean removeMine(int x, int y)
x
- la coordinata x della mina da rimuoverey
- la coordinata y della mina da rimuovere
public void nextTurn() throws java.lang.Exception
java.lang.Exception
public int[][] getMineFieldMatrix()
public void endSim() throws java.lang.Exception
java.lang.Exception
public int getTotMines()
public int getTotUnminedMines()
public boolean isSimEnded()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |