From 5a92adbc39545c6b580ffb99cdf236ab15946ea3 Mon Sep 17 00:00:00 2001 From: Mohamed El Tahawy Date: Tue, 22 May 2018 16:18:23 +0400 Subject: [PATCH] Typo "oponent" to "opponent" --- .../algorithms/mcts/montecarlo/MonteCarloTreeSearch.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/algorithms/src/main/java/com/baeldung/algorithms/mcts/montecarlo/MonteCarloTreeSearch.java b/algorithms/src/main/java/com/baeldung/algorithms/mcts/montecarlo/MonteCarloTreeSearch.java index f428df45d3..a4918f674d 100644 --- a/algorithms/src/main/java/com/baeldung/algorithms/mcts/montecarlo/MonteCarloTreeSearch.java +++ b/algorithms/src/main/java/com/baeldung/algorithms/mcts/montecarlo/MonteCarloTreeSearch.java @@ -10,7 +10,7 @@ public class MonteCarloTreeSearch { private static final int WIN_SCORE = 10; private int level; - private int oponent; + private int opponent; public MonteCarloTreeSearch() { this.level = 3; @@ -32,11 +32,11 @@ public class MonteCarloTreeSearch { long start = System.currentTimeMillis(); long end = start + 60 * getMillisForCurrentLevel(); - oponent = 3 - playerNo; + opponent = 3 - playerNo; Tree tree = new Tree(); Node rootNode = tree.getRoot(); rootNode.getState().setBoard(board); - rootNode.getState().setPlayerNo(oponent); + rootNode.getState().setPlayerNo(opponent); while (System.currentTimeMillis() < end) { // Phase 1 - Selection @@ -93,7 +93,7 @@ public class MonteCarloTreeSearch { State tempState = tempNode.getState(); int boardStatus = tempState.getBoard().checkStatus(); - if (boardStatus == oponent) { + if (boardStatus == opponent) { tempNode.getParent().getState().setWinScore(Integer.MIN_VALUE); return boardStatus; }