Class CodeBreaker

java.lang.Object
mastermind.gui.scenes.Scene
mastermind.gui.scenes.CodeBreaker

public class CodeBreaker extends Scene
The Code Breaker gameplay.
  • Constructor Details

    • CodeBreaker

      public CodeBreaker(JFrame frame, MastermindAlgorithm algorithm)
      Represents the CodeBreaker scene in the application, inheriting from the parent `Scene` class.

      This scene manages the game logic and user interface for a Mastermind game implementation. It initializes necessary UI components, handles game interactions, and updates the game state.

      The class uses a selected algorithm to solve the Mastermind puzzle and provides controls for managing user responses and progression in the game.

      Parameters:
      frame - The parent `JFrame` that contains this scene.
      algorithm - The algorithm to be used for solving the Mastermind puzzle. Supported algorithms include `DonaldKnuth`, `Medium`, and `Basic`.
      Throws:
      IllegalArgumentException - if the provided algorithm is null or unsupported.