Exemplo n.º 1
0
 public void processCommands() {
   System.out.println(
       "All commands received! Sending to model! Numcommands = "
           + turnCommands.getCommands().size());
   myModel.performCommands(turnCommands);
   turnCommands.clear();
   commandsReceived = 0;
 }
Exemplo n.º 2
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();
 }