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
FieldsModifier and TypeFieldDescriptionstatic final DimensionDimension of the canvas (screen) where the game is drawn.static final intLength of the code to guess.static final FileFile containing predefined codes for the code maker.static final intMaximum number of guesses allowed.static final intTotal 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).
-