Index
All Classes and Interfaces|All Packages|Constant Field Values
A
- action() - Method in record class spinhex.model.TwoPhaseActionState.TwoPhaseAction
-
Returns the value of the
action
record component. - add(AxialPosition) - Method in record class spinhex.model.AxialPosition
-
Adds another axial position to this one.
- add(Score) - Method in class spinhex.score.ScoreManager
-
Adds a new score to the list of scores and saves it to the file.
- addHexTile(HexTile) - Method in class spinhex.ui.component.HexGrid
- ADJACENT_DIRECTIONS - Static variable in class spinhex.model.SpinHexModel
-
The relative positions of the six adjacent hexes in a hexagonal grid.
- AxialPosition - Record Class in spinhex.model
-
Represents a position in an axial coordinate system for a hexagonal grid.
- AxialPosition(int, int) - Constructor for record class spinhex.model.AxialPosition
-
Creates an instance of a
AxialPosition
record class.
B
- BFS - Class in spinhex
- BFS() - Constructor for class spinhex.BFS
- bind(ReadOnlyIntegerProperty) - Method in class spinhex.ui.component.HexTile
- BLUE - Static variable in class spinhex.model.HexColor
-
Represents a blue colored tile.
- board - Variable in class spinhex.model.SpinHexModel
-
The hexagonal grid representing the current state of the SpinHex board.
- BoardGameApplication - Class in spinhex
- BoardGameApplication() - Constructor for class spinhex.BoardGameApplication
- BreadthFirstSearchModified<T> - Class in solver
-
Implements the breadth-first search (BFS) algorithm to solve puzzles.
- BreadthFirstSearchModified() - Constructor for class solver.BreadthFirstSearchModified
C
- CLOCKWISE - Enum constant in enum class spinhex.model.Rotation
-
Represents a rotation in the clockwise direction.
- clone() - Method in class spinhex.model.HexagonalGrid
-
Creates a copy of this hexagonal grid.
- clone() - Method in class spinhex.model.SpinHexModel
-
Creates a clone of the current
SpinHexModel
state. - ConsoleGame - Class in spinhex
- ConsoleGame() - Constructor for class spinhex.ConsoleGame
- COUNTERCLOCKWISE - Enum constant in enum class spinhex.model.Rotation
-
Represents a rotation in the counterclockwise direction.
E
- equals(Object) - Method in class solver.Node
- equals(Object) - Method in record class spinhex.model.AxialPosition
-
Indicates whether some other object is "equal to" this one.
- equals(Object) - Method in class spinhex.model.HexagonalGrid
-
Compares this hexagonal grid with another object for equality.
- equals(Object) - Method in class spinhex.model.SpinHexModel
-
Checks if this
SpinHexModel
is equal to another object. - equals(Object) - Method in record class spinhex.model.TwoPhaseActionState.TwoPhaseAction
-
Indicates whether some other object is "equal to" this one.
- equals(Object) - Method in class spinhex.score.Score
-
Compares this Score object with the specified object for equality.
- expand() - Method in class solver.Node
-
Expands the node by generating all possible next states from the current state.
F
- from() - Method in record class spinhex.model.TwoPhaseActionState.TwoPhaseAction
-
Returns the value of the
from
record component.
G
- get(int, int) - Method in class spinhex.model.HexagonalGrid
-
Gets the value of a cell at the specified axial coordinates.
- get(AxialPosition) - Method in class spinhex.model.HexagonalGrid
-
Gets the value of a cell at the specified axial position.
- getAction() - Method in class jfxutils.TwoPhaseActionSelector
-
Returns the action selected.
- getAll() - Method in class spinhex.score.ScoreManager
-
Retrieves all scores from the file.
- getBoard() - Method in class spinhex.model.SpinHexModel
-
Gets the current state of the SpinHex board.
- getBoardSize() - Method in class spinhex.model.SpinHexModel
-
Gets the size of the SpinHex board.
- getFrom() - Method in class jfxutils.TwoPhaseActionSelector
-
Returns the source position selected.
- getHex(AxialPosition) - Method in class spinhex.model.SpinHexModel
-
Gets the color of the hex at the specified position.
- getHexMargin() - Method in class spinhex.ui.component.HexGrid
- getHexProperty(int, int) - Method in class spinhex.model.ReadOnlySpinHexModelWrapper
-
Returns a read-only property for the hex at the specified axial coordinates.
- getHexSize() - Method in class spinhex.ui.component.HexGrid
- getHexTiles() - Method in class spinhex.ui.component.HexGrid
- getLegalMoves() - Method in class spinhex.model.SpinHexModel
-
Gets the set of legal moves available from the current state.
- getMove() - Method in class solver.Node
-
Returns the move that created the state from the state of the parent node.
- getNeighbors(AxialPosition) - Method in class spinhex.model.SpinHexModel
-
Gets the neighbors of the hex at the specified position.
- getParent() - Method in class solver.Node
-
Returns the parent of the node.
- getPhase() - Method in class jfxutils.TwoPhaseActionSelector
-
Returns the current selection phase.
- getQ() - Method in class spinhex.ui.component.HexTile
- getRadius() - Method in class spinhex.model.HexagonalGrid
-
Returns the radius of the hexagonal grid.
- getS() - Method in class spinhex.ui.component.HexTile
- getScore() - Method in class spinhex.score.Score
-
Returns the numeric score value.
- getSize() - Method in class spinhex.model.HexagonalGrid
-
Returns the size of the hexagonal grid.
- getSolution() - Method in class spinhex.model.SpinHexModel
-
Gets the solved configuration of the SpinHex board.
- getState() - Method in class solver.Node
-
Returns the state represented by the node.
- getUsername() - Method in class spinhex.score.Score
-
Returns the username associated with this score.
- GREEN - Static variable in class spinhex.model.HexColor
-
Represents a green colored tile.
H
- hashCode() - Method in class solver.Node
- hashCode() - Method in record class spinhex.model.AxialPosition
-
Returns a hash code value for this object.
- hashCode() - Method in class spinhex.model.HexagonalGrid
-
Returns a hash code for this hexagonal grid.
- hashCode() - Method in class spinhex.model.SpinHexModel
-
Returns a hash code value for this
SpinHexModel
. - hashCode() - Method in record class spinhex.model.TwoPhaseActionState.TwoPhaseAction
-
Returns a hash code value for this object.
- hashCode() - Method in class spinhex.score.Score
-
Returns a hash code value for this Score object.
- HexagonalGrid - Class in spinhex.model
-
Represents a hexagonal grid for the
SpinHex
puzzle game. - HexagonalGrid(byte[][]) - Constructor for class spinhex.model.HexagonalGrid
-
Constructs a new hexagonal grid from a 2D byte array.
- HexagonalGrid(int) - Constructor for class spinhex.model.HexagonalGrid
-
Constructs a new hexagonal grid with the specified size.
- HexColor - Class in spinhex.model
-
Represents the available colors for hexagonal tiles in the SpinHex game.
- HexColor() - Constructor for class spinhex.model.HexColor
- HexGrid - Class in spinhex.ui.component
- HexGrid() - Constructor for class spinhex.ui.component.HexGrid
- HexTile - Class in spinhex.ui.component
- HexTile(int, int, int, int) - Constructor for class spinhex.ui.component.HexTile
I
- initialize() - Method in class spinhex.ui.controller.StartMenuController
- isInBounds(int, int) - Method in class spinhex.model.HexagonalGrid
-
Checks if the specified axial coordinates are within the bounds of the grid.
- isInBounds(AxialPosition) - Method in class spinhex.model.HexagonalGrid
-
Checks if an axial position is within the bounds of the grid.
- isInvalidSelection() - Method in class jfxutils.TwoPhaseActionSelector
-
Returns whether the last selection (i.e, for the source or the target respectively) was invalid.
- isLegalMove(TwoPhaseActionState.TwoPhaseAction<AxialPosition, Rotation>) - Method in class spinhex.model.SpinHexModel
-
Checks if the specified move action is legal.
- isLegalToMoveFrom(AxialPosition) - Method in class spinhex.model.SpinHexModel
-
Checks if it is legal to move from the specified position.
- isLegalToMoveFrom(T) - Method in interface spinhex.model.TwoPhaseActionState
-
Determines whether it is legal to initiate an action from the specified source.
- isReadyToMove() - Method in class jfxutils.TwoPhaseActionSelector
-
Returns whether the move is ready to be made.
- isSolved() - Method in class spinhex.model.SpinHexModel
-
Checks if the puzzle is solved.
J
- JFXTwoPhaseActionSelector<T,
U> - Class in jfxutils -
A subclass of
TwoPhaseActionSelector
that provides a property to observe the selection phase. - JFXTwoPhaseActionSelector(TwoPhaseActionState<T, U>) - Constructor for class jfxutils.JFXTwoPhaseActionSelector
-
Creates a
JFXTwoPhaseActionSelector
object to determine the next move in the state specified. - jfxutils - package jfxutils
-
This package extends the JFX utilities from the
hu.unideb.inf.homework-project-jfxutils
library.
M
- main(String[]) - Static method in class spinhex.BFS
- main(String[]) - Static method in class spinhex.ConsoleGame
- main(String[]) - Static method in class spinhex.Main
- Main - Class in spinhex
- Main() - Constructor for class spinhex.Main
- makeMove() - Method in class jfxutils.TwoPhaseActionSelector
-
Makes the move selected.
- makeMove(TwoPhaseActionState.TwoPhaseAction<AxialPosition, Rotation>) - Method in class spinhex.model.ReadOnlySpinHexModelWrapper
-
Makes a move in the SpinHex model and updates the property model accordingly.
- makeMove(TwoPhaseActionState.TwoPhaseAction<AxialPosition, Rotation>) - Method in class spinhex.model.SpinHexModel
-
Makes a move based on the specified action.
N
- Node<T> - Class in solver
-
Represents the nodes of a search graph.
- Node(State<T>) - Constructor for class solver.Node
-
Creates a
Node
without a parent, i.e., a root node. - Node(State<T>, Node<T>, T) - Constructor for class solver.Node
-
Creates a
Node
with a parent node. - NONE - Static variable in class spinhex.model.HexColor
-
Represents an empty tile, logically equivalent to
null
.
P
- phase - Variable in class jfxutils.TwoPhaseActionSelector
-
The current phase of the action selection process.
- phaseProperty() - Method in class jfxutils.JFXTwoPhaseActionSelector
-
Represents the current selection phase.
- populateFromGrid(HexagonalGrid) - Method in class spinhex.ui.component.HexGrid
Q
- q() - Method in record class spinhex.model.AxialPosition
-
Returns the value of the
q
record component.
R
- ReadOnlySpinHexModelWrapper - Class in spinhex.model
-
A read-only wrapper for the SpinHex model that provides access to the board properties without allowing modifications.
- ReadOnlySpinHexModelWrapper() - Constructor for class spinhex.model.ReadOnlySpinHexModelWrapper
-
Constructs a read-only wrapper for a SpinHex model with the default board.
- ReadOnlySpinHexModelWrapper(byte[][], byte[][]) - Constructor for class spinhex.model.ReadOnlySpinHexModelWrapper
-
Constructs a read-only wrapper for a SpinHex model with the specified starting and target boards.
- READY_TO_MOVE - Enum constant in enum class jfxutils.TwoPhaseActionSelector.Phase
-
Phase where both source position and action have been selected and the move is ready to be executed.
- RED - Static variable in class spinhex.model.HexColor
-
Represents a red colored tile.
- reset() - Method in class jfxutils.TwoPhaseActionSelector
-
Resets the selection state, clearing both the source position and action selections.
- Rotation - Enum Class in spinhex.model
-
Represents the direction of rotation in the SpinHex game.
- RotationSelectorOverlay - Class in spinhex.ui.component
- RotationSelectorOverlay(double, double, int) - Constructor for class spinhex.ui.component.RotationSelectorOverlay
S
- s() - Method in record class spinhex.model.AxialPosition
-
Returns the value of the
s
record component. - Score - Class in spinhex.score
-
Represents a score in the game, associating a username with a numeric score.
- Score() - Constructor for class spinhex.score.Score
-
Default constructor that creates an empty Score object.
- Score(String, int) - Constructor for class spinhex.score.Score
-
Creates a Score object with the specified username and score.
- ScoreManager - Class in spinhex.score
-
Manages the storage and retrieval of Score objects.
- ScoreManager(Path) - Constructor for class spinhex.score.ScoreManager
-
Constructs a new ScoreManager with the specified file path.
- SELECT_ACTION - Enum constant in enum class jfxutils.TwoPhaseActionSelector.Phase
-
Phase where the user selects which action to apply at the selected position.
- SELECT_FROM - Enum constant in enum class jfxutils.TwoPhaseActionSelector.Phase
-
Phase where the user selects the source position.
- selectAction(U) - Method in class jfxutils.TwoPhaseActionSelector
-
Selects an action to be performed at the previously selected source position.
- selectFrom(T) - Method in class jfxutils.TwoPhaseActionSelector
-
Selects a source position from which an action will be performed.
- set(int, int, byte) - Method in class spinhex.model.HexagonalGrid
-
Sets the value of a cell at the specified axial coordinates.
- set(AxialPosition, byte) - Method in class spinhex.model.HexagonalGrid
-
Sets the value of a cell at the specified axial position.
- setHexMargin(double) - Method in class spinhex.ui.component.HexGrid
- setHexSize(int) - Method in class spinhex.ui.component.HexGrid
- setOnClockwiseClick(EventHandler<? super MouseEvent>) - Method in class spinhex.ui.component.RotationSelectorOverlay
- setOnCounterClockwiseClick(EventHandler<? super MouseEvent>) - Method in class spinhex.ui.component.RotationSelectorOverlay
- setPhase(TwoPhaseActionSelector.Phase) - Method in class jfxutils.JFXTwoPhaseActionSelector
-
Sets the value of the
phase
property. - setPhase(TwoPhaseActionSelector.Phase) - Method in class jfxutils.TwoPhaseActionSelector
-
Sets the current selection phase.
- setSize(int) - Method in class spinhex.ui.component.HexGrid
- setUsername(String) - Method in class spinhex.ui.controller.SpinHexController
- solve(State<T>) - Method in class solver.BreadthFirstSearchModified
-
Searches for the shortest solution for the puzzle starting from the state provided.
- solveAndPrintSolution(State<T>) - Method in class solver.BreadthFirstSearchModified
-
Searches for the shortest solution for the puzzle starting from the state provided, and it also prints the solution to the standard output.
- solver - package solver
-
Package for solving puzzles.
- spinhex - package spinhex
-
This package contains the classes and utilities for the SpinHex game.
- spinhex.model - package spinhex.model
-
This package contains the model classes for the SpinHex application.
- spinhex.score - package spinhex.score
-
This package contains classes and interfaces related to the scoring system used in the SpinHex game.
- spinhex.ui - package spinhex.ui
-
This package contains the user interface classes for the SpinHex application.
- spinhex.ui.component - package spinhex.ui.component
-
This package contains the UI components for the SpinHex game.
- spinhex.ui.controller - package spinhex.ui.controller
-
This package contains the controllers for the SpinHex game UI.
- SpinHexController - Class in spinhex.ui.controller
- SpinHexController() - Constructor for class spinhex.ui.controller.SpinHexController
- SpinHexModel - Class in spinhex.model
-
A model for the SpinHex puzzle game, which implements the
TwoPhaseActionState
interface. - SpinHexModel() - Constructor for class spinhex.model.SpinHexModel
-
Constructs a new
SpinHexModel
with the initial board configuration. - SpinHexModel(byte[][], byte[][]) - Constructor for class spinhex.model.SpinHexModel
-
Constructs a new
SpinHexModel
with a specified starting board and target board. - start(Stage) - Method in class spinhex.BoardGameApplication
- StartMenuController - Class in spinhex.ui.controller
- StartMenuController() - Constructor for class spinhex.ui.controller.StartMenuController
- subtract(AxialPosition) - Method in record class spinhex.model.AxialPosition
-
Subtracts another axial position from this one.
T
- toString() - Method in class solver.Node
- toString() - Method in record class spinhex.model.AxialPosition
-
Returns a string representation of this position in the format "(q,s)".
- toString() - Method in class spinhex.model.SpinHexModel
-
Returns a string representation of the
SpinHexModel
board. - toString() - Method in record class spinhex.model.TwoPhaseActionState.TwoPhaseAction
-
Returns a string representation of this record class.
- TwoPhaseAction(T, U) - Constructor for record class spinhex.model.TwoPhaseActionState.TwoPhaseAction
-
Creates an instance of a
TwoPhaseAction
record class. - TwoPhaseActionSelector<T,
U> - Class in jfxutils -
Utility class to determine the next action in two-phase action selection puzzles.
- TwoPhaseActionSelector(TwoPhaseActionState<T, U>) - Constructor for class jfxutils.TwoPhaseActionSelector
-
Creates a
TwoPhaseActionSelector
to manage the action selection process for the given state. - TwoPhaseActionSelector.Phase - Enum Class in jfxutils
-
Represents the current phase of the action selection process.
- TwoPhaseActionState<T,
U> - Interface in spinhex.model -
Represents a state in a two-phase action system where actions are performed in two distinct phases: first selecting a source element, then specifying the action to perform from that source.
- TwoPhaseActionState.TwoPhaseAction<T,
U> - Record Class in spinhex.model -
Represents a two-phase action consisting of a source element and the action to be performed.
V
- valueOf(String) - Static method in enum class jfxutils.TwoPhaseActionSelector.Phase
-
Returns the enum constant of this class with the specified name.
- valueOf(String) - Static method in enum class spinhex.model.Rotation
-
Returns the enum constant of this class with the specified name.
- values() - Static method in enum class jfxutils.TwoPhaseActionSelector.Phase
-
Returns an array containing the constants of this enum class, in the order they are declared.
- values() - Static method in enum class spinhex.model.Rotation
-
Returns an array containing the constants of this enum class, in the order they are declared.
All Classes and Interfaces|All Packages|Constant Field Values