--- jsr166/src/test/loops/Microscope.java 2011/12/05 04:08:46 1.8 +++ jsr166/src/test/loops/Microscope.java 2014/12/31 17:00:58 1.12 @@ -5,11 +5,11 @@ */ import java.awt.*; -import javax.swing.*; -import java.util.*; import java.awt.event.*; -import javax.swing.event.*; +import java.util.*; import java.util.concurrent.*; +import javax.swing.*; +import javax.swing.event.*; /** @@ -479,7 +479,7 @@ public class Microscope extends JPanel { * threads (instead new ones are constructed), so don't * need any synch. */ - static final class Board { + static final class Board { /* First, some Constants and utilities that might as well be here @@ -761,7 +761,7 @@ public class Microscope extends JPanel { synchronized boolean isFrom(int r, int c) { return fromRow== r && fromCol == c; } - synchronized boolean isTo(int r, int c) { + synchronized boolean isTo(int r, int c) { return toRow == r && toCol == c; } synchronized Board board() { @@ -1005,7 +1005,7 @@ public class Microscope extends JPanel { Finder forked = null; // list of forked subtasks when level > 1 long open = ~(ours | theirs); // currently empty cells - long here = 1; // travserse through bits + long here = 1; // traverse through bits for (int k = 0; k < Board.CELLS; ++k, here <<= 1) { if ((here & ours) != 0) { @@ -1173,7 +1173,7 @@ public class Microscope extends JPanel { long nextOurs = bestFinder.theirs; long nextTheirs = bestFinder.ours; long blue = player.isBlue() ? nextOurs : nextTheirs; - long green = player.isBlue() ? nextTheirs: nextOurs; + long green = player.isBlue() ? nextTheirs : nextOurs; move = new Move(player, new Board(blue, green), true); } automover.relay(move);