Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AWJ W1D1 Количество конечных состояний игры: 510. #136

Open
odtour opened this issue Nov 17, 2021 · 0 comments
Labels
AWJ-bugs Algorithms With Java

Comments

@odtour
Copy link

odtour commented Nov 17, 2021

Вот такой код проходит тест 10 раз подряд. А не должен.

public static Set<XoBoard> generateEndStates() {
    Set<XoBoard> endStates = new HashSet<>();

    while (endStates.size() < 510) {
      XoBoard newBoard = new XoBoard();
      newBoard.fillRandom();
      if (newBoard.hasWinner() != null || newBoard.tie()) {
        endStates.add(newBoard);
      }
    }
    return endStates;
  } 

02

@seralekseenko seralekseenko added the AWJ-bugs Algorithms With Java label Nov 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AWJ-bugs Algorithms With Java
Projects
None yet
Development

No branches or pull requests

2 participants