Package Helper
Class Configuration
- java.lang.Object
-
- Helper.Configuration
-
public abstract class Configuration extends java.lang.Object
Configuration class holds static variables and methods used throughout the Domineering game.- Since:
- 2023-12-01
- Version:
- 1.0
- Author:
- Laamiri Ouail & Hajar Sadik
-
-
Field Summary
Fields Modifier and Type Field Description static int
asymMove
Asymmetrical move identifier.static int
asymPercentCeil
Upper bound percentage for asymmetrical moves.static int
asymPercentFloor
Lower bound percentage for asymmetrical moves.static Button[][]
buttons
2D array representing the game buttons.static short
column
Number of columns in the game board.static java.lang.String
defaultColor
Default color code for empty spaces on the board.static DomineeringSearch
domineeringSearch
Singleton instance of the DomineeringSearch class.static StringTableFile
file
StringTableFile instance for file-related operations.static java.lang.String
fileColors
File path for storing color configurations.static java.lang.String
fileConfiguration
File path for storing game configurations.static java.lang.String
fileSauvgarde
File path for saving game states.static Button
helpBtn
Button to trigger the help functionality.static Move
helpMove
Move for help functionality.static short
helpPlayer1
Number of help moves available for player 1.static short
helpPlayer2
Number of help moves available for player 2.static java.lang.String
intermediateColor
Color code for intermediate state during help moves.static Position
intermediatePosition
Position for intermediate state during help moves.static Label
labelMessage
Label for displaying messages.static byte
machine
Machine player identifier.static java.lang.String
machineColor
Color code for machine-controlled pieces.static java.lang.String
mainBgColor
Main background color code.static byte
move
Move identifier.static byte
player
Current player (1 or 2).static java.lang.String
player1Color
Color code for player 1's pieces.static java.lang.String
player2Color
Color code for player 2's pieces.static short
row
Number of rows in the game board.static int
safeMovesCoef
Coefficient for safe moves.
-
Constructor Summary
Constructors Constructor Description Configuration()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
helpPlayer()
Provides help to the player based on the current game state.static void
initializeHelpPlayerParameters()
Initializes the parameters for help functionality.static boolean
isColor(java.lang.String hexaColor)
static void
setMove(byte move)
Sets the current move.static void
testHelpButton()
Tests if the help button should be enabled based on the current game state.
-
-
-
Field Detail
-
helpPlayer1
public static short helpPlayer1
Number of help moves available for player 1.
-
helpPlayer2
public static short helpPlayer2
Number of help moves available for player 2.
-
helpBtn
public static Button helpBtn
Button to trigger the help functionality.
-
row
public static short row
Number of rows in the game board.
-
column
public static short column
Number of columns in the game board.
-
player1Color
public static java.lang.String player1Color
Color code for player 1's pieces.
-
player2Color
public static java.lang.String player2Color
Color code for player 2's pieces.
-
intermediateColor
public static java.lang.String intermediateColor
Color code for intermediate state during help moves.
-
defaultColor
public static java.lang.String defaultColor
Default color code for empty spaces on the board.
-
mainBgColor
public static java.lang.String mainBgColor
Main background color code.
-
fileColors
public static java.lang.String fileColors
File path for storing color configurations.
-
fileSauvgarde
public static java.lang.String fileSauvgarde
File path for saving game states.
-
fileConfiguration
public static java.lang.String fileConfiguration
File path for storing game configurations.
-
machineColor
public static java.lang.String machineColor
Color code for machine-controlled pieces.
-
buttons
public static Button[][] buttons
2D array representing the game buttons.
-
player
public static byte player
Current player (1 or 2).
-
machine
public static byte machine
Machine player identifier.
-
move
public static byte move
Move identifier.
-
labelMessage
public static Label labelMessage
Label for displaying messages.
-
asymPercentFloor
public static int asymPercentFloor
Lower bound percentage for asymmetrical moves.
-
asymPercentCeil
public static int asymPercentCeil
Upper bound percentage for asymmetrical moves.
-
asymMove
public static int asymMove
Asymmetrical move identifier.
-
safeMovesCoef
public static int safeMovesCoef
Coefficient for safe moves.
-
intermediatePosition
public static Position intermediatePosition
Position for intermediate state during help moves.
-
helpMove
public static Move helpMove
Move for help functionality.
-
domineeringSearch
public static DomineeringSearch domineeringSearch
Singleton instance of the DomineeringSearch class.
-
file
public static StringTableFile file
StringTableFile instance for file-related operations.
-
-
Method Detail
-
setMove
public static void setMove(byte move)
Sets the current move.- Parameters:
move
- The move identifier.
-
helpPlayer
public static void helpPlayer()
Provides help to the player based on the current game state.
-
initializeHelpPlayerParameters
public static void initializeHelpPlayerParameters()
Initializes the parameters for help functionality.
-
testHelpButton
public static void testHelpButton()
Tests if the help button should be enabled based on the current game state.
-
isColor
public static boolean isColor(java.lang.String hexaColor)
-
-