Labyrinth
A labyrinth game assignment
host.labyrinth.Node Class Reference

Node object for minimax tree. More...

Package Functions

Constructors
 Node ()
 Null initialize constructor. More...
 
 Node (Node parent, int nodeDepth, int [] nodeMove, Board nodeBoard, double nodeEvaluation)
 The main constructor for the Node. More...
 
 Node (Board nodeBoard)
 A special constructor for creating a root Node. More...
 
Get/Set interface
Node getParent ()
 Get parent. More...
 
ArrayList< NodegetChildren ()
 get children More...
 
int getNodeDepth ()
 get nodeDepth More...
 
int [] getNodeMove ()
 get nodeMove More...
 
Board getNodeBoard ()
 get nodeBoard More...
 
double getNodeEvaluation ()
 get nodeEvluation More...
 
Node getPath ()
 get path More...
 
void setParent (Node parent)
 set parent More...
 
void setChildren (ArrayList< Node > children)
 set children More...
 
void setNodeDepth (int nodeDepth)
 set nodeDepth More...
 
void setNodeMove (int[] nodeMove)
 set nodeMove More...
 
void setNodeBoard (Board nodeBoard)
 set nodeBoard More...
 
void setNodeEvaluation (double nodeEvaluation)
 set nodeEvaluation More...
 
void setPath (Node path)
 set path More...
 
Public API
boolean addChild (Node child)
 Add a child to the tree. More...
 

Private Attributes

Data members
Node parent
 Back reference to parent Node. More...
 
ArrayList< Nodechildren
 Fwd reference to leaf Nodes. More...
 
int nodeDepth
 The Node's depth. More...
 
int [] nodeMove
 The Node's move data [tile, initTile, points, roll]. More...
 
Board nodeBoard
 Reference to Board's copy of the current node. More...
 
double nodeEvaluation
 The Node's evaluation result. More...
 
Node path
 The minimax evaluation path. More...
 

Detailed Description

Node object for minimax tree.

Definition at line 20 of file Node.java.

Constructor & Destructor Documentation

◆ Node() [1/3]

host.labyrinth.Node.Node ( )
package

Null initialize constructor.

Definition at line 25 of file Node.java.

◆ Node() [2/3]

host.labyrinth.Node.Node ( Node  parent,
int  nodeDepth,
int []  nodeMove,
Board  nodeBoard,
double  nodeEvaluation 
)
package

The main constructor for the Node.

Definition at line 27 of file Node.java.

◆ Node() [3/3]

host.labyrinth.Node.Node ( Board  nodeBoard)
package

A special constructor for creating a root Node.

Definition at line 37 of file Node.java.

Member Function Documentation

◆ addChild()

boolean host.labyrinth.Node.addChild ( Node  child)
package

Add a child to the tree.

Parameters
childThe child to add
Returns
the status of the operation

Definition at line 102 of file Node.java.

◆ getChildren()

ArrayList<Node> host.labyrinth.Node.getChildren ( )
package

get children

Definition at line 54 of file Node.java.

◆ getNodeBoard()

Board host.labyrinth.Node.getNodeBoard ( )
package

get nodeBoard

Definition at line 60 of file Node.java.

◆ getNodeDepth()

int host.labyrinth.Node.getNodeDepth ( )
package

get nodeDepth

Definition at line 56 of file Node.java.

◆ getNodeEvaluation()

double host.labyrinth.Node.getNodeEvaluation ( )
package

get nodeEvluation

Definition at line 62 of file Node.java.

◆ getNodeMove()

int [] host.labyrinth.Node.getNodeMove ( )
package

get nodeMove

Definition at line 58 of file Node.java.

◆ getParent()

Node host.labyrinth.Node.getParent ( )
package

Get parent.

Definition at line 51 of file Node.java.

◆ getPath()

Node host.labyrinth.Node.getPath ( )
package

get path

Definition at line 64 of file Node.java.

◆ setChildren()

void host.labyrinth.Node.setChildren ( ArrayList< Node children)
package

set children

Definition at line 69 of file Node.java.

◆ setNodeBoard()

void host.labyrinth.Node.setNodeBoard ( Board  nodeBoard)
package

set nodeBoard

Definition at line 81 of file Node.java.

◆ setNodeDepth()

void host.labyrinth.Node.setNodeDepth ( int  nodeDepth)
package

set nodeDepth

Definition at line 73 of file Node.java.

◆ setNodeEvaluation()

void host.labyrinth.Node.setNodeEvaluation ( double  nodeEvaluation)
package

set nodeEvaluation

Definition at line 85 of file Node.java.

◆ setNodeMove()

void host.labyrinth.Node.setNodeMove ( int []  nodeMove)
package

set nodeMove

Definition at line 77 of file Node.java.

◆ setParent()

void host.labyrinth.Node.setParent ( Node  parent)
package

set parent

Definition at line 67 of file Node.java.

◆ setPath()

void host.labyrinth.Node.setPath ( Node  path)
package

set path

Definition at line 89 of file Node.java.

Member Data Documentation

◆ children

ArrayList<Node> host.labyrinth.Node.children
private

Fwd reference to leaf Nodes.

Definition at line 112 of file Node.java.

◆ nodeBoard

Board host.labyrinth.Node.nodeBoard
private

Reference to Board's copy of the current node.

Definition at line 115 of file Node.java.

◆ nodeDepth

int host.labyrinth.Node.nodeDepth
private

The Node's depth.

Definition at line 113 of file Node.java.

◆ nodeEvaluation

double host.labyrinth.Node.nodeEvaluation
private

The Node's evaluation result.

Definition at line 116 of file Node.java.

◆ nodeMove

int [] host.labyrinth.Node.nodeMove
private

The Node's move data [tile, initTile, points, roll].

Definition at line 114 of file Node.java.

◆ parent

Node host.labyrinth.Node.parent
private

Back reference to parent Node.

Definition at line 111 of file Node.java.

◆ path

Node host.labyrinth.Node.path
private

The minimax evaluation path.

Definition at line 117 of file Node.java.


The documentation for this class was generated from the following file: