|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.hagenah.diplomacy.game.Game
de.hagenah.diplomacy.diptool.DipGame
public class DipGame
A game.
| Method Summary | |
|---|---|
DiaryEntry |
createDiaryEntry(Person from,
int number,
java.lang.String text,
Phase phase)
Creates a new diary entry (if the diary entry doesn't already exist) |
Message |
createMessage(boolean anonymous,
Person from,
boolean toallbut,
java.util.Collection to,
boolean faketoallbut,
java.util.Collection faketo,
java.lang.String text,
java.util.Date date)
Creates a new message (if the message doesn't already exist) |
Turn |
createTurn(int number,
Phase phase,
java.util.Date turndate)
Retrieves the specified turn. |
void |
deleteDiaryEntry(DiaryEntry entry)
Deletes a diary entry. |
void |
deleteMessage(Message msg)
Removes the message msg. |
MessageFilter |
getFilter()
Returns the current message filter. |
java.util.List |
getFilteredDiaryEntries(int number)
Returns a (ordered) list with the messages for the specified turn. |
java.util.List |
getFilteredMessages(int number)
Returns a (ordered) list with the messages for the specified turn. |
DipGameGroup |
getGroup()
Returns the group |
protected Turn |
internCreateTurn(int number,
Phase phase)
Creates a Turn object |
void |
rollback(int number,
boolean removeallorders)
Rolls the game back to the turn number. |
void |
setFilter(MessageFilter filter)
Sets a new message filter. |
void |
setTurnDate(int number,
java.util.Date turndate)
Sets the date of the turn. |
| Methods inherited from class de.hagenah.diplomacy.game.Game |
|---|
areMessagesCached, compareTo, equals, getComment, getDescription, getDiaryEntries, getDiaryEntry, getDiaryEntryTurn, getIdentity, getJudge, getLastPhase, getMap, getMessages, getMessageTurn, getMostRecentTurn, getName, getOptions, getParameter, getParameters, getParameterValue, getPersonInfo, getSpecialCenters, getSpecialPhaseCenters, getTurn, getTurn, getTurnDate, getTurnIndex, getTurns, getVictors, hashCode, hasOption, hasParameterFlag, processTurns, setComment, setIdentity, setLastPhase, setOptions, setParameters, setPersonInfo, setVictors, toString, wasConceded |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public DipGameGroup getGroup()
protected Turn internCreateTurn(int number,
Phase phase)
internCreateTurn in class Game
public Turn createTurn(int number,
Phase phase,
java.util.Date turndate)
createTurn in class Gamenumber - The number of the phase (>=Turn.NUMBER_FIRST).phase - The phase (!=null).turndate - The date of the turn (can be null if unknown)
public void rollback(int number,
boolean removeallorders)
rollback in class Gamenumber - The number of the turn to rollback toremoveallorders - true: all orders of the turn number are removed, false: only the
NMR orders are removed and the result flags of the other orders are
cleared.
public DiaryEntry createDiaryEntry(Person from,
int number,
java.lang.String text,
Phase phase)
createDiaryEntry in class Gamefrom - The person that created the diary entry (can be null if unknown)number - The number of the diary entry (-1 if unknown)text - The diary entry text (\n as line separator)phase - The phase in which the diary entry was created
public void deleteDiaryEntry(DiaryEntry entry)
deleteDiaryEntry in class Gameentry - The diary entry to delete.
public Message createMessage(boolean anonymous,
Person from,
boolean toallbut,
java.util.Collection to,
boolean faketoallbut,
java.util.Collection faketo,
java.lang.String text,
java.util.Date date)
createMessage in class Gameanonymous - Is the message anonymous (grey)?from - The person that sent the message (can be null if unknown)toallbut - false → the message was sent to to, true → the message was
send to all but to (if to is an empty list it was a broadcast message).to - The interpretation depends on toallbut (can be null if unknown)faketoallbut - false → the message was faked to faketo, true → the message was
faked to all but faketo (if faketo is an empty list it was a faked broadcast message).faketo - The interpretation depends on faketoallbut (cannot be null)text - The message text (\n as line separator)date - The date of the message (can be null)
public void deleteMessage(Message msg)
deleteMessage in class Gamemsg - The message to deletepublic MessageFilter getFilter()
public void setFilter(MessageFilter filter)
filter - The new filterpublic java.util.List getFilteredMessages(int number)
number - The number of the turn
public java.util.List getFilteredDiaryEntries(int number)
number - The number of the turn
public void setTurnDate(int number,
java.util.Date turndate)
setTurnDate in class Gamenumber - The number of the turnturndate - The date of the turn (can be null to clear the date)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||