[Commit] RRbot Ricochet.java,1.2,1.3
Adam Ingram-Goble
commit at keithp.com
Mon Jun 9 01:45:33 PDT 2003
Committed by: adamaig
Update of /local/src/CVS/RRbot
In directory home.keithp.com:/tmp/cvs-serv1909
Modified Files:
Ricochet.java
Log Message:
Index: Ricochet.java
===================================================================
RCS file: /local/src/CVS/RRbot/Ricochet.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- Ricochet.java 9 Jun 2003 07:35:24 -0000 1.2
+++ Ricochet.java 9 Jun 2003 07:45:31 -0000 1.3
@@ -179,17 +179,23 @@
//check to see if it is a solution
if ( robMatrixPos == goalMatrixPos ) {
System.out.println( "SOLUTION" );
+ String testString = "";
//System.out.println( newMoves );
for (int c=0; c < newMoves.length(); c++ ) {
- if ( (c % 2) == 0 ) {
+ if ( (c % 2) == 0 && c != 0 ) {
System.out.print( " " );
+ testString += " ";
}
System.out.print( newMoves.charAt(c) );
+ testString += newMoves.charAt( c );
}
System.out.println();
System.out.println( "in " + newMoves.length() / 2 + " moves" );
System.out.println( solToRRstr( newMoves ));
-
+/*
+ String[] chckArgs = { "game1.gm", testString };
+ SolutionChecker.main( chckArgs );
+*/
System.exit(1);
}
More information about the Commit
mailing list