예제 #1
0
 private void allStopped() {
   logger.info("All stones have stopped moving");
   currentStone = null;
   for (Stone s : world.getStones()) {
     s.setFreeGuard(false);
   }
   game.getMatchCtrl().nextTurn();
 }
예제 #2
0
 private int countFreeGuards() {
   int cnt = 0;
   for (Stone s : world.getStones()) {
     if (s.isFreeGuard()) {
       cnt++;
     }
   }
   return cnt;
 }
예제 #3
0
 void prepareFreeGuardZone(int team) {
   List<Stone> stones = world.getStones();
   savedStones = new ArrayList<Stone>(stones.size());
   for (Stone s : stones) {
     savedStones.add(s.clone());
   }
   logger.fine("Saved stones: " + savedStones);
   logger.info("Marking free guards");
   world.markFreeGuards(team);
 }
예제 #4
0
 private void updateSweep() {
   if (currentStone == null) {
     return;
   }
   double sweep = ui.getSelectedSweep();
   if (sweep != currentStone.getSweep()) {
     currentStone.setSweep(sweep);
     game.sendAllStones(world.getStones());
   }
 }