Skip to content
Permalink
Browse files

Replace magic number with variable

  • Loading branch information
joesweeney committed Apr 19, 2017
1 parent aa8c3ce commit 21962b7fdabab1a533cde54ab38423aabf477eee
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/RmCheckersClient.java
@@ -148,6 +148,7 @@ public static void main(String[] argv){
}

public void playGame(int player) {
int minPly = 8;
try {
String msg = readAndEcho(); // initial message
if(player == 1) { // black
@@ -160,7 +161,7 @@ else if(player == 2) { // white
}
while(currentState.actions().size()>0){
currentState.printState();
Move myMove = ai.minimax(currentState, 8);
Move myMove = ai.minimax(currentState, minPly);
writeMessageAndEcho(myMove.toString());
if(!applyMove(myMove.toString())) {
System.out.println("couldn't apply my move");

0 comments on commit 21962b7

Please sign in to comment.
You can’t perform that action at this time.