WIP. Probably need to cherry pick stuff out of here.

Added ClientConnection and server-side handshake.
Added MessageSerialiser and Deserialiser.
#story[1095]
This commit is contained in:
fjc40
2017-08-10 12:13:40 +12:00
parent 3ec87582d3
commit 7cc39abe57
35 changed files with 1837 additions and 793 deletions
@@ -0,0 +1,25 @@
package mock.model.commandFactory;
import mock.model.MockRace;
import java.util.Stack;
/**
* Wraps multiple commands into a composite to execute queued commands during a frame.
*/
public class CompositeCommand implements Command {
private Stack<Command> commands;
public CompositeCommand() {
this.commands = new Stack<>();
}
public void addCommand(Command command) {
commands.push(command);
}
@Override
public void execute(MockRace race) {
while(!commands.isEmpty()) commands.pop().execute(race);
}
}