public class MassagingManagement
extends java.lang.Object
| Constructor and Description |
|---|
MassagingManagement(WarriorServerThread connection) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getConfig(int coresize,
int linelength,
int maxinstructions,
int gamecycles,
java.lang.String gameStandard)
if you want to get a config package call this method
You have to give this method all infos about the configuration of the
core:
|
java.lang.String |
getErrorMassage(java.lang.String errormessage)
if you want to get a error package call this method
|
java.lang.String |
getFinishMassage(java.lang.String state)
if you want to get a finish package call this method
|
java.lang.String |
getStartMassage(java.util.ArrayList<java.lang.Integer> core,
java.util.ArrayList<java.lang.String> players)
if you want to get a start package call this method
|
java.lang.String |
getUpdateMassage(java.lang.Integer index,
java.lang.Integer value)
if you want to get a update package call this method
|
java.lang.String |
getValidation(java.lang.Boolean everythingFine,
java.lang.String errorcode)
if you want to get a validation package call this method
|
java.lang.String |
getWaitingMassage()
if you want to get a wait package call this method
|
(package private) void |
receiveMassage(java.lang.String msg)
if you got a new massage you can send it to this method and it will
handle everything for you
|
(package private) void |
setCode(java.lang.String msg)
handles all stuff if it is a code package
|
public MassagingManagement(WarriorServerThread connection)
void receiveMassage(java.lang.String msg)
msg - This parameter is the message you have to deal withvoid setCode(java.lang.String msg)
msg - This parameter is the message you have to deal withpublic java.lang.String getConfig(int coresize,
int linelength,
int maxinstructions,
int gamecycles,
java.lang.String gameStandard)
coresize - linelength - maxinstructions - gamecycles - gameStandard - public java.lang.String getValidation(java.lang.Boolean everythingFine,
java.lang.String errorcode)
everythingFine - give it true, if there was no error false if there was an
errorerrorcode - what went wrong?public java.lang.String getWaitingMassage()
public java.lang.String getErrorMassage(java.lang.String errormessage)
errormessage - What went wrong?public java.lang.String getStartMassage(java.util.ArrayList<java.lang.Integer> core,
java.util.ArrayList<java.lang.String> players)
core - the startcoreplayers - the players that play against, in the right order so you can
index the values in the core to the playerspublic java.lang.String getUpdateMassage(java.lang.Integer index,
java.lang.Integer value)
index - the position were something changedvalue - who is now at this position...public java.lang.String getFinishMassage(java.lang.String state)
state - who won the game?