package
{
    /// マップのノード管理
    public class Node
    {
        public var parent:Node; ///< 親
        public var state:int;   ///< 状態
        public var x:int;       ///< X座標
        public var y:int;       ///< Y座標
        public var f_star:Number = 0;   ///< f*

        /// コンストラクタ
        public function Node(x:int, y:int, state:int):void
        {
            this.x = x;
            this.y = y;
            this.state = state;
            parent = null;
        }

        /// 初期化
        public function clear():void{
            this.parent = null;
            this.f_star = 0;
        }

        /// ゴールか?
        public function isGoalNode():Boolean{
            if(this.state == AStar.G){
                return true;
            }
            return false;
        }

        /// 歩けるところか?
        public function isWalk():Boolean{
            if(this.state != AStar.X){
                return true;
            }
            return false;
        }
    }

}