Skip to content

Commit

Permalink
Refactor: Change check of empty list
Browse files Browse the repository at this point in the history
  • Loading branch information
JonBergland committed Jan 22, 2024
1 parent ee39fbe commit 8eea584
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ public boolean isTerminal() {
if (checkWin() != "") {
return true;
}
//if board is full
return (getActions().size() == 0);
//Check for draw (no more empty spaces)
return getActions().isEmpty();
}

/**
Expand Down

0 comments on commit 8eea584

Please sign in to comment.