Version 0.8.0
============= Just before creating the external config file
This commit is contained in:
@ -87,7 +87,7 @@ public class OpeningBook {
|
||||
*/
|
||||
public static void played(Move move) {
|
||||
for (int i=0; i<validMoves.length; i++) {
|
||||
if(validMoves[i] && (book.get(i).length>=nbOfMovesThatHaveBeenPlayed)) {
|
||||
if(validMoves[i] && (book.get(i).length>nbOfMovesThatHaveBeenPlayed)) {
|
||||
if (!(book.get(i)[nbOfMovesThatHaveBeenPlayed].equals(move.toString()))) {
|
||||
validMoves[i]=false; //this branch is not valid anymore
|
||||
}
|
||||
@ -107,7 +107,7 @@ public class OpeningBook {
|
||||
for(int j=nbOfMovesThatHaveBeenPlayed; j<book.get(i).length; j++) {
|
||||
formatVariation += book.get(i)[j]+" ";
|
||||
}
|
||||
System.out.println(1+"\t"+0+"\t"+0+"\t"+validMoves.length+"\t"+formatVariation+" [Book Move]");
|
||||
System.out.println(" "+1+"\t"+0+"\t"+0+"\t"+validMoves.length+"\t"+formatVariation+" [Book Move]");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -118,7 +118,6 @@ public class OpeningBook {
|
||||
|
||||
Random generator = new Random();
|
||||
Move chosenMove = possibleMoves.get(generator.nextInt(possibleMoves.size()));
|
||||
played(chosenMove);
|
||||
return chosenMove;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user