Package mastermind
Class Mastermind
java.lang.Object
mastermind.Mastermind
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 Summary
Modifier and TypeFieldDescriptionstatic final Dimension
Dimension of the canvas (screen) where the game is drawn.static final int
Length of the code to guess.static final File
File containing predefined codes for the code maker.static final int
Maximum number of guesses allowed.static final int
Total number of colors available to choose from. -
Method Summary
-
Field Details
-
CODE_LENGTH
public static final int CODE_LENGTHLength of the code to guess.- See Also:
-
MAX_GUESSES
public static final int MAX_GUESSESMaximum 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_COLORSTotal number of colors available to choose from.- See Also:
-
CODEMAKER_PREDEFINED_CODES
File containing predefined codes for the code maker. -
CANVAS_DIMENSION
Dimension of the canvas (screen) where the game is drawn.
-
-
Method Details
-
main
Main method of the game.- Parameters:
args
- Command line arguments (unused).
-