public void processCommands() { System.out.println( "All commands received! Sending to model! Numcommands = " + turnCommands.getCommands().size()); myModel.performCommands(turnCommands); turnCommands.clear(); commandsReceived = 0; }
public void receiveCommandList(CommandList ls) { turnCommands.addCommands(ls.getCommands()); commandsReceived++; System.out.println(commandsReceived + " " + myInfo.getPlayers().size()); if (commandsReceived >= myInfo.getPlayers().size()) { this.processCommands(); if (!unitsPlaced) { unitsPlaced = true; this.start(); } } }
static { CommandList.populate(); AdditionalCommandList.populate(); }