public class DummyTransaction extends java.lang.Object implements Transaction<DummyGameState>
Constructor and Description |
---|
DummyTransaction(java.lang.String s) |
Modifier and Type | Method and Description |
---|---|
void |
play(DummyGameState state)
Play this transaction to the game state supplied
|
boolean |
playable(DummyGameState state)
Check if this transaction can be played back on this game state
Usually you implement this with at least requiring the correct type of GameState
|
JSONObject |
serialize()
Returns a JSON representation of transaction
This can later be recreated by a factory
|
public void play(DummyGameState state)
Transaction
play
in interface Transaction<DummyGameState>
state
- Game state to modifypublic boolean playable(DummyGameState state)
Transaction
playable
in interface Transaction<DummyGameState>
state
- Game state to check for playabilitypublic JSONObject serialize()
Transaction
serialize
in interface Transaction<DummyGameState>
TransactionFactory