The ParallelGamePlayer class implements the Player interface that defines the play method:
@Override public void play() { final var table = new Table(NR_COLUMNS, colorManager); final var secret = new RandomSecret(colorManager); final var secretGuess = secret.createSecret(NR_COLUMNS); final var game = new Game(table, secretGuess); final var guessers = createGuessers(table); final var finalCheckGuesser = new UniqueGuesser(table); startAsynchronousGuessers(guessers); try { while (!game.isFinished()) { final var guess = guessQueue.take(); if (finalCheckGuesser.guessMatch(guess)) { game.addNewGuess(guess); } } } catch (InterruptedException ie) { } finally { stopAsynchronousGuessers(guessers); } }
This method creates a Table, a RandomSecret that...