dam
Class Node

java.lang.Object
  extended by dam.Node

public class Node
extends java.lang.Object

class Main


Field Summary
static int N
           
 
Constructor Summary
Node(int[] position)
          Constructor
Node(Node node)
          Constructor 2
 
Method Summary
 boolean isEnd()
          boolean isEnd()
 Node selectBest()
          Node selectBest() Selects one of the best moves
 java.lang.String toString()
          String toString()
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

N

public static int N
Constructor Detail

Node

public Node(int[] position)
Constructor

Parameters:
position - chessboard
prev - previous node

Node

public Node(Node node)
Constructor 2

Parameters:
node - actual node
prev - previous node
Method Detail

selectBest

public Node selectBest()
Node selectBest() Selects one of the best moves

Returns:
one of the best moves
Throws:
java.lang.Exception

isEnd

public boolean isEnd()
boolean isEnd()

Returns:
true if the problem has been solved

toString

public java.lang.String toString()
String toString()

Overrides:
toString in class java.lang.Object