Package Inteligence

Source Code of Inteligence.Node

package Inteligence;

import basicObjects.boardObjects.Board;
import java.util.ArrayList;

public class Node {

    private int moveBox;
    private int point;
    private Board board;
    private Node parent;
    private ArrayList<Node> childrenNodes = new ArrayList();

    public Node() {
        this.board = new Board();
    }

    public Node(Board board) {
        this.board = board;
    }

    public void AddChildren(Node node) {
        childrenNodes.add(node);
        node.Parent(this);
    }

    private void Parent(Node node) {
        this.parent = node;
    }

    public void copy(Node node) {
        this.point = node.point;
        // this.board.copy(node.board);
    }

    public void Print() {
        System.out.println("");
        System.out.println("Point " + this.point);
        System.out.println("moveBox " + this.moveBox);
    }

    public Board getBoard() {
        return board;
    }

    public void setMoveBox(int moveBox) {
        this.moveBox = moveBox;
    }

    public void setPoint(int Point) {
        this.point = Point;
    }

    public Node getParent() {
        return parent;
    }

    public int getMoveBox() {
        return moveBox;
    }
}
TOP

Related Classes of Inteligence.Node

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.