[Commit] RRClient ChangeLog,1.1,1.2 RRBoard.java,1.9,1.10
Keith Packard
commit at keithp.com
Wed Jan 7 21:17:30 PST 2004
Committed by: keithp
Update of /local/src/CVS/RRClient
In directory home.keithp.com:/tmp/cvs-serv25164
Modified Files:
ChangeLog RRBoard.java
Log Message:
* RRBoard.java: (RRBoard.moveRobot):
Allow missing robots (happens during reset)
* RRNetIn.java: (RRNetIn.ResetHandler.match):
Take patch to ResetHandler from Bart.
Index: ChangeLog
===================================================================
RCS file: /local/src/CVS/RRClient/ChangeLog,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- ChangeLog 8 Jan 2004 04:48:46 -0000 1.1
+++ ChangeLog 8 Jan 2004 05:17:27 -0000 1.2
@@ -1,6 +1,13 @@
2004-01-07 Keith Packard <keithp at keithp.com>
* RRBoard.java: (RRBoard.moveRobot):
+ Allow missing robots (happens during reset)
+ * RRNetIn.java: (RRNetIn.ResetHandler.match):
+ Take patch to ResetHandler from Bart.
+
+2004-01-07 Keith Packard <keithp at keithp.com>
+
+ * RRBoard.java: (RRBoard.moveRobot):
* RRClient.java: (RRClient.main):
* RRController.java: (RRController):
* RRMessages.java: (RRMessages), (RRMessages.RRMessages),
Index: RRBoard.java
===================================================================
RCS file: /local/src/CVS/RRClient/RRBoard.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- RRBoard.java 8 Jan 2004 04:48:46 -0000 1.9
+++ RRBoard.java 8 Jan 2004 05:17:27 -0000 1.10
@@ -285,17 +285,16 @@
}
synchronized public void moveRobot(int color, RRBoardCoord end) {
- RRBoardCoord start = null;
for (int i = 0; i < dim; i++) {
for (int j = 0; j < dim; j++) {
if (squares[i][j].getRobot() == color) {
- start = new RRBoardCoord(i, j);
+ RRBoardCoord start = new RRBoardCoord(i, j);
+ RRSquare ss = squares[start.row][start.col];
+ ss.clearRobot();
break;
}
}
}
- RRSquare ss = squares[start.row][start.col];
- ss.clearRobot();
RRSquare se = squares[end.row][end.col];
se.setRobot(color);
}
More information about the Commit
mailing list