mastermind.model
Class Settings

java.lang.Object
  extended by mastermind.model.Settings
All Implemented Interfaces:
java.io.Serializable

public class Settings
extends java.lang.Object
implements java.io.Serializable

Mastermind Settings: Hilfsobjekt für die Optionen

See Also:
Serialized Form

Field Summary
static int ANZ_COLOR_MAX
          Maximale Anzahl Farben
static int ANZ_COLOR_MIN
          Minimale Anzahl Farben
static int ANZ_DESIGN_MAX
          Maximale Anzahl Design
static int ANZ_GUESS_MAX
          Maximale Anzahl Rateversuchen
static int ANZ_GUESS_MIN
          Minimale Anzahl Rateversuchen
static int ANZ_PEG_MAX
          Maximale Anzahl Steckplätze
static int ANZ_PEG_MIN
          Minimale Anzahl Steckplätze
 
Constructor Summary
Settings()
          Default Konstruktor
 
Method Summary
 boolean getAllowDuplicateColor()
          Gibt zurück ob doppelte Farben erlaubt sind
 int getDesign()
          Gibt die ID des verwendete Design zurück
 int getNumberOfColors()
          Gibt die Anzahl mögliche Farben zurück
 int getNumberOfPegs()
          Gibt die Anzahl Steckplätze zurück
 int getNumberOfRows()
          Gibt die Anzahl Zeilen zurück
 void setAllowDuplicateColor(boolean allowDuplicateColor)
          Erlaubt / sperrt die Option doppelte Farben
 void setDesign(int idDesign)
          Setzt das zu verwendende Design
 void setNumberOfColors(int numberOfColors)
          Setzt die Anzahl der möglichen Farben
 void setNumberOfPegs(int numberOfPegs)
          Setzt die Anzahl Steckplätze
 void setNumberOfRows(int numberOfRows)
          Setzt die Anzahl Zeilen
 void setSettings(int numberOfColors, boolean allowDuplicateColor, int numberOfPegs, int numberOfRows)
          Set Mastermind Settings.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ANZ_COLOR_MIN

public static final int ANZ_COLOR_MIN
Minimale Anzahl Farben

See Also:
Constant Field Values

ANZ_COLOR_MAX

public static final int ANZ_COLOR_MAX
Maximale Anzahl Farben

See Also:
Constant Field Values

ANZ_PEG_MIN

public static final int ANZ_PEG_MIN
Minimale Anzahl Steckplätze

See Also:
Constant Field Values

ANZ_PEG_MAX

public static final int ANZ_PEG_MAX
Maximale Anzahl Steckplätze

See Also:
Constant Field Values

ANZ_GUESS_MIN

public static final int ANZ_GUESS_MIN
Minimale Anzahl Rateversuchen

See Also:
Constant Field Values

ANZ_GUESS_MAX

public static final int ANZ_GUESS_MAX
Maximale Anzahl Rateversuchen

See Also:
Constant Field Values

ANZ_DESIGN_MAX

public static final int ANZ_DESIGN_MAX
Maximale Anzahl Design

See Also:
Constant Field Values
Constructor Detail

Settings

public Settings()
Default Konstruktor

Method Detail

setSettings

public void setSettings(int numberOfColors,
                        boolean allowDuplicateColor,
                        int numberOfPegs,
                        int numberOfRows)
                 throws java.lang.Exception
Set Mastermind Settings.

Parameters:
numberOfColors - Anzahl Farben
allowDuplicateColor - Doppelte Farben erlaubt
numberOfPegs - Anzahl Steckplätze
numberOfRows - Anzahl Zeilen zum Raten
Throws:
java.lang.Exception - IllegalArgumentException

getNumberOfColors

public int getNumberOfColors()
Gibt die Anzahl mögliche Farben zurück

Returns:
the numberOfColors

setNumberOfColors

public void setNumberOfColors(int numberOfColors)
                       throws java.lang.Exception
Setzt die Anzahl der möglichen Farben

Parameters:
numberOfColors - the numberOfColors to set
Throws:
java.lang.Exception - IllegalArgumentException

getNumberOfPegs

public int getNumberOfPegs()
Gibt die Anzahl Steckplätze zurück

Returns:
the numberOfPegs

setNumberOfPegs

public void setNumberOfPegs(int numberOfPegs)
                     throws java.lang.Exception
Setzt die Anzahl Steckplätze

Parameters:
numberOfPegs - the numberOfPegs to set
Throws:
java.lang.Exception - IllegalArgumentException

getAllowDuplicateColor

public boolean getAllowDuplicateColor()
Gibt zurück ob doppelte Farben erlaubt sind

Returns:
allowDuplicateColor

setAllowDuplicateColor

public void setAllowDuplicateColor(boolean allowDuplicateColor)
Erlaubt / sperrt die Option doppelte Farben

Parameters:
allowDuplicateColor - the allowDuplicateColor to set

getNumberOfRows

public int getNumberOfRows()
Gibt die Anzahl Zeilen zurück

Returns:
the numberOfRows

setNumberOfRows

public void setNumberOfRows(int numberOfRows)
                     throws java.lang.Exception
Setzt die Anzahl Zeilen

Parameters:
numberOfRows - the numberOfRows to set
Throws:
java.lang.Exception - IllegalArgumentException

getDesign

public int getDesign()
Gibt die ID des verwendete Design zurück

Returns:
ID des Design

setDesign

public void setDesign(int idDesign)
Setzt das zu verwendende Design

Parameters:
idDesign - ID des zu verwendenden Design