Package mastermind

Class Mastermind

java.lang.Object
mastermind.Mastermind

public class Mastermind extends Object
Main class of the Mastermind game.

This class initializes the logger and the main window of the game, and stores the game's constants (configuration).

  • Field Details

    • CODE_LENGTH

      public static final int CODE_LENGTH
      Length of the code to guess.
      See Also:
    • MAX_GUESSES

      public static final int MAX_GUESSES
      Maximum number of guesses allowed.

      The code breaker loses the game if they reach this number of guesses.

      See Also:
    • TOTAL_COLORS

      public static final int TOTAL_COLORS
      Total number of colors available to choose from.
      See Also:
    • CODEMAKER_PREDEFINED_CODES

      public static final File CODEMAKER_PREDEFINED_CODES
      File containing predefined codes for the code maker.
    • CANVAS_DIMENSION

      public static final Dimension CANVAS_DIMENSION
      Dimension of the canvas (screen) where the game is drawn.
  • Method Details

    • main

      public static void main(String[] args)
      Main method of the game.
      Parameters:
      args - Command line arguments (unused).