|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectsimulations.core.Game
public class Game
This class describes the game structure
| Constructor Summary | |
|---|---|
Game(java.util.ArrayList playerList,
long randomSeed,
int loosingPoints,
float winnerPoints,
float coalitionPoints,
boolean proportional,
int traceLevel,
java.io.File historyFile,
java.io.File graphFile,
int coalitionDefinition,
boolean noSave,
boolean coalSave)
Creates a new instance of Game |
|
| Method Summary | |
|---|---|
java.util.ArrayList |
getClonePlayerList()
Return the list of all player The list is a clone |
java.util.ArrayList |
getCloneRemainingPlayer()
Return the list of all player with more than 1 HP The list is a clone |
int |
getCoalitionDefinition()
Getter for property coalitionDefinition. |
float |
getCoalitionPoints()
Getter for property coalitionPoints. |
java.io.File |
getGraphFile()
Getter for property graphFile. |
java.io.File |
getHistoryFile()
Getter for property historyFile. |
int |
getLoosingPoints()
Getter for property loosingPoints. |
Player |
getPlayer(Player p)
Returns the Player corresponding to p |
java.util.ArrayList |
getPlayerList()
Getter for property playerList. |
long |
getRandomSeed()
Getter for property randomSeed. |
java.util.ArrayList |
getRemainingPlayer()
Return the list of all player with more than 1 HP |
java.lang.String |
getStringCoalitionDefinition()
Return the string description of the coalition definition |
int |
getTraceLevel()
Getter for property trace_level. |
float |
getWinnerPoints()
Getter for property winnerPoints. |
boolean |
isCoalitionSave()
Getter for property coalitionSave. |
boolean |
isFinish()
Return true if the game is finish |
boolean |
isNoSave()
Getter for property noSave. |
boolean |
isProportional()
Getter for property proportional. |
void |
setCoalitionDefinition(int coalitionDefinition)
Setter for property coalitionDefinition. |
void |
setCoalitionPoints(float coalitionPoints)
Setter for property coalitionPoints. |
void |
setCoalitionSave(boolean coalitionSave)
Setter for property coalitionSave. |
void |
setGraphFile(java.io.File graphFile)
Setter for property graphFile. |
void |
setHistoryFile(java.io.File historyFile)
Setter for property historyFile. |
void |
setLoosingPoints(int loosingPoints)
Setter for property loosingPoints. |
void |
setNoSave(boolean noSave)
Setter for property noSave. |
void |
setPlayerList(java.util.ArrayList playerList)
Setter for property playerList. |
void |
setProportional(boolean proportional)
Setter for property proportional. |
void |
setRandomSeed(long randomSeed)
Setter for property randomSeed. |
void |
setTraceLevel(int traceLevel)
Setter for property trace_level. |
void |
setWinnerPoints(float winnerPoints)
Setter for property winnerPoints. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Game(java.util.ArrayList playerList,
long randomSeed,
int loosingPoints,
float winnerPoints,
float coalitionPoints,
boolean proportional,
int traceLevel,
java.io.File historyFile,
java.io.File graphFile,
int coalitionDefinition,
boolean noSave,
boolean coalSave)
graphFile - The file to save graphloosingPoints - The points loosing by the attacked playerwinnerPoints - The proportion (%) of the loosingPoints earn by the attacking playercoalitionPoints - The proportion (%) of the loosingPoints earn by the players helping the attacking playerproportional - true if the reditributed points are reditributed proportionnaly between the
players helping the attacktraceLevel - The trace level of the historyplayerList - The list of all playersrandomSeed - The random seed for the random generatorhistoryFile - The history filecoalitionDefinition - The definition of a coalitionnoSave - true if the game will not save the historycoalitionSave - true if the game will save coalition data| Method Detail |
|---|
public boolean isFinish()
public java.util.ArrayList getCloneRemainingPlayer()
public java.util.ArrayList getClonePlayerList()
public Player getPlayer(Player p)
p - The player
public java.util.ArrayList getRemainingPlayer()
public java.util.ArrayList getPlayerList()
public void setPlayerList(java.util.ArrayList playerList)
playerList - New value of property playerList.public long getRandomSeed()
public void setRandomSeed(long randomSeed)
randomSeed - New value of property randomSeed.public float getWinnerPoints()
public void setWinnerPoints(float winnerPoints)
winnerPoints - New value of property winnerPoints.public boolean isProportional()
public void setProportional(boolean proportional)
proportional - New value of property proportional.public int getLoosingPoints()
public void setLoosingPoints(int loosingPoints)
loosingPoints - New value of property loosingPoints.public float getCoalitionPoints()
public void setCoalitionPoints(float coalitionPoints)
coalitionPoints - New value of property coalitionPoints.public int getTraceLevel()
public void setTraceLevel(int traceLevel)
traceLevel - The trace levelpublic java.io.File getHistoryFile()
public void setHistoryFile(java.io.File historyFile)
historyFile - New value of property historyFile.public int getCoalitionDefinition()
public java.lang.String getStringCoalitionDefinition()
public void setCoalitionDefinition(int coalitionDefinition)
coalitionDefinition - New value of property coalitionDefinition.public java.io.File getGraphFile()
public void setGraphFile(java.io.File graphFile)
graphFile - New value of property graphFile.public boolean isNoSave()
public void setNoSave(boolean noSave)
noSave - New value of property noSave.public boolean isCoalitionSave()
public void setCoalitionSave(boolean coalitionSave)
coalitionSave - New value of property coalitionSave.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||