A B C D E F G H I K L M N P Q R S T V W X 

A

aboutDialog - Variable in class gui.MainWindow
 
aboutMenuItemActionPerformed(ActionEvent) - Method in class gui.MainWindow
Show the about dialog.
activeRowNumber - Variable in class game.GameField
 
addRow() - Method in class gui.MainWindow
Add a new Row to the game table.
addToFeasibleCodes() - Method in class ai.GeneticSolver
A code c is eligible or feasible if it results in the same values for Xk and Yk for all guesses k that have been played up till that stage, if c was the secret code.
ai - package ai
Solving algorithms for the Mastermind engine (package game).
AI_GUESS_DELAY - Variable in class gui.MainWindow
The delay between two guesses (if the makeGuess()-Function of the AI was fast enouth).
aiMode - Variable in class game.Settings
Game mode.
aiTimer - Variable in class gui.MainWindow
 
allCols - Variable in class ai.Bruteforce
 
allCols - Variable in class ai.RandomGuesses
All colors available in the game.
allowedCols - Variable in class ai.Bruteforce
Arrays of colors holding all colors (allCols) and the colors used in the running game (allowedCols).
allowedCols - Variable in class ai.RandomGuesses
The colors that are "allowed" in the game.

B

blacks - Variable in class ai.GeneticSolver
 
Bruteforce - Class in ai
A solving algorithm using the brutefore technic.
Bruteforce(ControlInterface) - Constructor for class ai.Bruteforce
Initialize the AI with settings from the Mastermind engine.

C

calcFitness() - Method in class ai.GeneticSolver
Calculates the fitness of every Row in population.
cancelButtonActionPerformed(ActionEvent) - Method in class gui.MainWindow
Hide the settings dialog without saving.
checkActiveRow() - Method in class game.Game
Checks the active game Row.
chosenColorButton - Variable in class gui.MainWindow
 
ci - Variable in class ai.Bruteforce
The ControlInterface to work with.
ci - Variable in class ai.GeneticSolver
 
ci - Variable in class ai.RandomGuesses
The ControlInterface to work with.
ci - Static variable in class gui.MainWindow
 
closeButtonActionPerformed(ActionEvent) - Method in class gui.MainWindow
Hide the about dialog.
Clues - Class in ai
Check if a guess is valide or makes no sense in context of previous guesses and results.
Clues() - Constructor for class ai.Clues
 
Color - Enum in common
Color Enumeration.
Color(int) - Constructor for enum common.Color
Std.
colorButtons - Variable in class gui.MainWindow
 
colorButtonsActionPerformed(ActionEvent) - Method in class gui.MainWindow
Set the chosen color.
colorQuant - Variable in class ai.GeneticSolver
 
colors - Variable in class common.Row
 
colorScrollPane - Variable in class gui.MainWindow
 
colorsSlider - Variable in class gui.MainWindow
 
colQuant - Variable in class ai.Bruteforce
Range of colors to choose from
colQuant - Variable in class ai.RandomGuesses
Range of colors to choose from.
colQuant - Variable in class game.Settings
Range of colors to choose from.
common - package common
Common classes to interact with the Mastermind engine.
compare(Row, Row) - Static method in class ai.Clues
Compare two Rows to another.
compare(Row, Row) - Method in class ai.GeneticSolver
Compares two Rows.
containsColor(Color) - Method in class common.Row
Checks how often a Row contains a specific color.
containsDoubleColor() - Method in class common.Row
Checks if the same Color is inside the Row more than once.
ControlInterface - Class in game
The main interface to control the gameflow.
ControlInterface() - Constructor for class game.ControlInterface
 

D

dbgPrint(String) - Static method in class common.Debug
Print the given String if debugging is enabled.
Debug - Class in common
Used for debugging, i.e. with a function for debug-output.
Debug() - Constructor for class common.Debug
 
debug - Static variable in class common.Debug
This value enables (true) or disables (false) debugging.
divide(int[], Row[], int, int, int) - Method in class ai.GeneticSolver
Helper function for partitioning.
doAIGame() - Method in class gui.MainWindow
Run an AI game until the game is solved.
doubleColors - Variable in class ai.Bruteforce
Allowance of same colors
doubleColors - Variable in class ai.GeneticSolver
 
doubleColors - Variable in class ai.RandomGuesses
Allowance of same colors.
doubleColors - Variable in class game.Settings
Allowance of same colors.
doubleColorsCheckBox - Variable in class gui.MainWindow
 
doubleToRnd(Row[]) - Method in class ai.GeneticSolver
Replaces double elements in newPopulation.

E

editSettingsMenuItemActionPerformed(ActionEvent) - Method in class gui.MainWindow
Show the settings dialog.
equals(Object) - Method in class common.Row
Check if the specified object equals this Row.
error - Static variable in class common.Debug
This value enables (true) or disables (false) error messages.
errorPrint(String) - Static method in class common.Debug
Print the given String if error is enabled.
evolvePopulation() - Method in class ai.GeneticSolver
Evolve the population using cross over, mutation, permutation and inversion. 0.5 probability for both xOver1 and xOver2 after the crossover 0.03 chance for mutation 0.03 chance for permutation 0.02 chance for inversion Reproduction

F

FEASIBLE_CODES_MAX - Variable in class ai.GeneticSolver
Max. amount of feasible codes.
feasibleCodes - Variable in class ai.GeneticSolver
 
FILE_EXTENSION - Variable in class game.ControlInterface
The file extension for saving.
fileChooser - Variable in class gui.MainWindow
 
findColorIndex(Color[], Color) - Method in class ai.Bruteforce
Search for a Color in an array and return its index.
fitness - Variable in class ai.GeneticSolver
 

G

game - package game
A Mastermind game engine.
game - Variable in class game.ControlInterface
 
Game - Class in game
Game-engine class.
Game(Settings) - Constructor for class game.Game
Constructor with init instructions for new game.
gameButtonPinActionPerformed(ActionEvent) - Method in class gui.MainWindow
Place the chosen color to the game table pin.
gameButtonResultActionPerformed(ActionEvent) - Method in class gui.MainWindow
Check the active game Row and display the result.
gameButtons - Variable in class gui.MainWindow
 
gameEnded - Variable in class game.Game
 
gameField - Variable in class game.Game
 
GameField - Class in game
The actual game field.
GameField(int, int) - Constructor for class game.GameField
Constructor which inits the game field with width and max. tries.
gameField - Variable in class game.GameField
 
gameMenuBar - Variable in class gui.MainWindow
 
gameModeComboBox - Variable in class gui.MainWindow
 
gamePanel - Variable in class gui.MainWindow
 
gamePlaceholder - Variable in class gui.MainWindow
 
gameScrollPane - Variable in class gui.MainWindow
 
gameState - Variable in class gui.MainWindow
 
gameWidthSlider - Variable in class gui.MainWindow
 
generateCode(int, int, boolean) - Method in class game.SecretCode
Creates a secret code.
generateGuess() - Method in class ai.Bruteforce
Generate a guess by "incrementing" the previous guess.
generateGuess() - Method in class ai.GeneticSolver
Create new generations until enough egible codes are found.
generateGuess() - Method in class ai.RandomGuesses
Generating a totaly random guess ignoring previous results.
generateGuess() - Method in interface ai.SolvingAlgorithm
Generate a guess and return it as a Row.
generateRndGuess() - Method in class ai.GeneticSolver
Generates a Row with random colors.
GENERATION_SIZE - Variable in class ai.GeneticSolver
Number of generations.
GeneticSolver - Class in ai
A genetic solving algorithm.
GeneticSolver(ControlInterface) - Constructor for class ai.GeneticSolver
Initialize the AI with settings from the Mastermind engine.
geneticSolverTest(int) - Method in class ai.GeneticSolver
Speed test.
getActiveRowNumber() - Method in class game.ControlInterface
Getter for the active Row number.
getActiveRowNumber() - Method in class game.GameField
Getter for the active Row number.
getAiMode() - Method in class game.Settings
Getter for game mode.
getCode() - Method in class game.SecretCode
Getter for the secret code.
getColorAtPos(int) - Method in class common.Row
Get a color at a specific position in the Row.
getColors() - Method in class common.Row
Getter for a Row.
getColQuant() - Method in class game.Settings
Getter for the quantity of colors used in the game.
getDoubleCol() - Method in class game.Settings
Getter for double color allowance.
getField() - Method in class game.GameField
Getter for the whole game field.
getGameEnded() - Method in class game.ControlInterface
Getter for game ended state.
getGameFieldRow(int) - Method in class game.ControlInterface
Get a specific game Row.
getLastResultRow() - Method in class game.ControlInterface
Get the newest results.
getLoaded() - Method in class game.ControlInterface
Getter for loaded game state.
getMaxTries() - Method in class game.Settings
Getter for max. tries (guesses).
getParentPos() - Method in class ai.GeneticSolver
Getter for a good parent position in the population.
getResult() - Method in class game.GameField
Getter for active (last) result Row.
getResult(int) - Method in class game.GameField
Getter for a result Row.
getResultRow(int) - Method in class game.ControlInterface
Get a specific result Row.
getRGB() - Method in enum common.Color
Returning the SRGB-code as an int.
getRow() - Method in class game.GameField
Getter for the active Row.
getRow(int) - Method in class game.GameField
Getter for a game Row.
getSecretCode() - Method in class game.ControlInterface
Get the secret code.
getSettingAiMode() - Method in class game.ControlInterface
Getter for AI mode.
getSettingColQuant() - Method in class game.ControlInterface
Getter for the color quantity.
getSettingDoubleCol() - Method in class game.ControlInterface
Getter for double colors allowance.
getSettingMaxTries() - Method in class game.ControlInterface
Getter for max. number of tries (guesses).
getSettingWidth() - Method in class game.ControlInterface
Getter for the game width.
getWidth() - Method in class game.Settings
Getter for the game width.
guess - Variable in class ai.Bruteforce
Holding the guess
gui - package gui
A GUI for the Mastermind engine (package game).

H

howToMenuItemActionPerformed(ActionEvent) - Method in class gui.MainWindow
Show the how-to.pdf in the system std. viewer.

I

incActiveRowNumber() - Method in class game.GameField
Increments the active row number by one.
initColorTable() - Method in class gui.MainWindow
Initialize the color table with the available colors.
initComponents() - Method in class gui.MainWindow
Init all GUI components (Constructor subfunction, called only once).
initGameTable() - Method in class gui.MainWindow
Initialize the game table (game field).
initKeyListener() - Method in class gui.MainWindow
Initialize a global Key Listener.
initNewGame() - Method in class gui.MainWindow
Initialize all GUI components for a new game.
initPopulation() - Method in class ai.GeneticSolver
Initializes the Population with random Rows.
initResults() - Method in class ai.GeneticSolver
Initialize the arrays "blacks" and "whites" with values from the GameField.
initSecretCode() - Method in class gui.MainWindow
Initialize the secret code row.
inversion(Row[], int) - Method in class ai.GeneticSolver
Inversion.
isFeasible(ControlInterface, Row) - Static method in class ai.Clues
Checks if the guess is valide or makes no sense in context of previous guesses and results.

K

keyTyped(KeyEvent) - Method in class gui.MainWindow
Parse the typed key.

L

load() - Method in class game.ControlInterface
Load a game from "savegame" file.
load(String) - Method in class game.ControlInterface
Load a game from a specific path/filename.
loaded - Variable in class game.ControlInterface
Identifier for loaded games.
loadMenuItemActionPerformed(ActionEvent) - Method in class gui.MainWindow
Show file browser dialog and load chosen game.
lookForSame(Row[], int) - Method in class ai.GeneticSolver
Look for Rows that are equal to the Row at popPos in newPopulation.

M

main(String[]) - Static method in class gui.MainWindow
Parse command line arguments, change to "Nimbus" Look & Feel (if installed) and initialize the main window with a new standard game.
MainWindow - Class in gui
Provides a GUI for the Mastermind game engine.
MainWindow() - Constructor for class gui.MainWindow
Creates new form MainWindow and initializes all components.
makeGuess() - Method in class ai.Bruteforce
Do a full guess on the Mastermind engine.
makeGuess() - Method in class ai.GeneticSolver
Do a full guess on the Mastermind engine.
makeGuess() - Method in class ai.RandomGuesses
Do a full guess on the Mastermind engine.
makeGuess() - Method in interface ai.SolvingAlgorithm
This function creates a guess and does a full turn in the game.
maxTries - Variable in class game.Settings
Maximum number of Tries.
maxTriesSpinner - Variable in class gui.MainWindow
 
mutation(Row[], int) - Method in class ai.GeneticSolver
Mutation.

N

newGame() - Method in class game.ControlInterface
Start a new game.
newGameMenuItemActionPerformed(ActionEvent) - Method in class gui.MainWindow
Initialize a new game.

P

parentPos - Variable in class ai.GeneticSolver
 
parseArgs(String[]) - Static method in class gui.MainWindow
Subfunction to parse the arguments from the command line.
parseGameState(int) - Method in class gui.MainWindow
Parse the return state of the ControlInterface.turn() function.
permutation(Row[], int) - Method in class ai.GeneticSolver
Permutation.
population - Variable in class ai.GeneticSolver
 
POPULATION_SIZE - Variable in class ai.GeneticSolver
Size of the population within a generation.

Q

quitMenuItemActionPerformed(ActionEvent) - Method in class gui.MainWindow
Quit the whole game.

R

RandomGuesses - Class in ai
A "solving algorithm" that makes random guesses.
RandomGuesses(ControlInterface) - Constructor for class ai.RandomGuesses
Initialize the AI with settings from the Mastermind engine.
resultField - Variable in class game.GameField
 
revealSecretCode() - Method in class gui.MainWindow
Reveals the secret code by showing it in the GUI.
rgb - Variable in enum common.Color
 
Row - Class in common
This class represents a single Row with colors.
Row(Color[]) - Constructor for class common.Row
Constructor for a Row with colors.
Row(int) - Constructor for class common.Row
Constructor for a Row with a given width.
rowIsSet() - Method in class gui.MainWindow
Checks if the complete active Row in the game table is set with a color.

S

save() - Method in class game.ControlInterface
Save the game with settings as "savegame" file.
save(String) - Method in class game.ControlInterface
Save the game with settings to a specific path/filename.
saveAsMenuItemActionPerformed(ActionEvent) - Method in class gui.MainWindow
Show file browser dialog and save game to the given path and name.
saveButtonActionPerformed(ActionEvent) - Method in class gui.MainWindow
Save, init new game (with new settings) and hide dialog.
secretCode - Variable in class game.Game
 
SecretCode - Class in game
This class represents the secret code the player or the AI has to guess.
SecretCode(int, int, boolean) - Constructor for class game.SecretCode
Initializes a new secret code with the given parameters.
secretCode - Variable in class game.SecretCode
 
secretCodeButtons - Variable in class gui.MainWindow
 
secretCodeButtonsActionPerformed(ActionEvent) - Method in class gui.MainWindow
Set the secret code color.
secretCodePanel - Variable in class gui.MainWindow
 
setAiMode(boolean) - Method in class game.Settings
Setter for game mode.
setCode(Row) - Method in class game.SecretCode
Setter for the secret code.
setColorAtPos(int, Color) - Method in class common.Row
Set a color at a specific position in the Row.
setColors(Color[]) - Method in class common.Row
Setter for a Row.
setColQuant(int) - Method in class game.Settings
Setter for the quantity of colors used in the game.
setDebug(boolean) - Static method in class common.Debug
Set the debugging on or off.
setDoubleCol(boolean) - Method in class game.Settings
Setter for double color allowance.
setField(Row[]) - Method in class game.GameField
Setter for the whole game field.
setLastGuessMenuItemMenuItemActionPerformed(ActionEvent) - Method in class gui.MainWindow
Set the last guess in the active row.
setMaxTries(int) - Method in class game.Settings
Setter for max. tries (guesses).
setResult(Row) - Method in class game.GameField
Setter - saves the result in the active Row of the result field.
setRow(int, Row) - Method in class game.GameField
Setter for a game Row.
setRow(Row) - Method in class game.GameField
Setter for the active Row.
setSecretCode(Color[]) - Method in class game.ControlInterface
Set the secret code.
setSettingAiMode(boolean) - Method in class game.ControlInterface
Setter for AI mode.
setSettingColQuant(int) - Method in class game.ControlInterface
Setter for the color quantity.
setSettingDoubleCol(boolean) - Method in class game.ControlInterface
Setter for double colors allowance.
setSettingMaxTries(int) - Method in class game.ControlInterface
Setter for max. number of tries (guesses).
setSettingWidth(int) - Method in class game.ControlInterface
Setter for the game width.
settings - Variable in class game.Game
 
Settings - Class in game
Contains all settings of a game.
Settings() - Constructor for class game.Settings
 
settingsDialog - Variable in class gui.MainWindow
 
setWidth(int) - Method in class game.Settings
Setter for the game width.
showGameRow(int) - Method in class gui.MainWindow
Show the guess row.
showHintMenuItemActionPerformed(ActionEvent) - Method in class gui.MainWindow
Fill out the current game table Row with a guess.
showLoadedGameTable() - Method in class gui.MainWindow
Draw the game table by using loaded game data.
showResultRow(int) - Method in class gui.MainWindow
Show the guess result of a Row.
SolvingAlgorithm - Interface in ai
This interface describes how a solving algorithm has to be implemented.
sort(int[], Row[], int, int) - Method in class ai.GeneticSolver
Helper function for recursive sorting.
sortFeasibleByFitness(int[], Row[]) - Method in class ai.GeneticSolver
This is a Quicksort that sorts the fitness and pop Arrays by the criteria in the fitness-array.
swap(int[], int, int) - Method in class ai.GeneticSolver
Helper function to swap two elements of an int array.
swap(Row[], int, int) - Method in class ai.GeneticSolver
Helper function to swap two elements of an array of Rows.

T

toString() - Method in class common.Row
Line-up all colors seperated with ",".
translateColor(Color) - Method in class gui.MainWindow
Translate the java.awt.Color to a common.Color.
turn() - Method in class game.ControlInterface
Do a full game turn.
turn() - Method in class game.Game
Aggregates the logic for a game turn.

V

validateGuessMenuItemActionPerformed(ActionEvent) - Method in class gui.MainWindow
Checks if the guess is valide or makes no sense in context of previous guesses and results.
valueOf(String) - Static method in enum common.Color
Returns the enum constant of this type with the specified name.
values() - Static method in enum common.Color
Returns an array containing the constants of this enum type, in the order they are declared.

W

whites - Variable in class ai.GeneticSolver
 
width - Variable in class ai.Bruteforce
Width of the Row
width - Variable in class ai.GeneticSolver
 
width - Variable in class ai.RandomGuesses
Width of the row.
width() - Method in class common.Row
Getter for the Row width.
width - Variable in class game.Settings
Width of the row.
writeSecrectCode() - Method in class gui.MainWindow
Cycles through the secret code (GUI) and sets it in the game engine.
writeToGameField(Color[]) - Method in class game.ControlInterface
Set a Row of colors to the active game Row.
writeToGameField() - Method in class gui.MainWindow
Cycles through the active game Row (GUI) and sets it in the game engine.

X

xOver1(Row[], int, int) - Method in class ai.GeneticSolver
One-point crossover.
xOver2(Row[], int, int) - Method in class ai.GeneticSolver
Two-point crossover.
A B C D E F G H I K L M N P Q R S T V W X