PuzzleNode Class

Represents a puzzle being solved by a player.

Definition

Namespace: SimpleAIPlayer
Assembly: SimpleAIPlayer (in SimpleAIPlayer.dll) Version: 1.0.0+d0f5e2a7a5f4bb0431970f279d2f79d24b15d256
C#
internal class PuzzleNode : INode<PuzzleNode>
Inheritance
Object    PuzzleNode
Implements
INodePuzzleNode

Constructors

PuzzleNode Initializes a new instance of the PuzzleNode class.

Properties

FinishedPuzzle Represents a puzzle that has been completed.
Id The ID of the node. Unique for each puzzle configuration.
NumTetrominosLeft The number of tetrominos left in the shared reserve for each TetrominoShape.
NumTetrominosOwned The number of tetrominos owned by the player for each TetrominoShape.
PuzzleId The ID of the puzzle represented by this node.

Methods

GetEdges Generates the possible transitions from this node. To get to a neighbor, the use of a PlaceTetrominoAction is required. This ensures that there are no loops in the graph. (Id is based on how filled in the puzzle is).
Heuristic Heuristic function to estimate distances between this node an the other node.

See Also