using System;
using System.Collections.Generic;
using System.Text;

namespace VisualPathFinder
{
    public class Point
    {
        int x;
        int y;
        Point parent;
        int moves;
        int movesLeft;

        #region Constructors

        public Point()
        {
            x = 0;
            y = 0;
            parent = null;
            moves = 0;
            movesLeft = int.MaxValue;
        }

        public Point(int x, int y)
        {
            this.x = x;
            this.y = y;
            parent = null;
            moves = 0;
            movesLeft = 0;
        }

        public Point(int x, int y, Point parent, int movesLeft)
        {
            this.x = x;
            this.y = y;
            this.parent = parent;
            this.moves = parent.moves + 1;
            this.movesLeft = movesLeft;
        }

        #endregion

        #region Properties
        public int X
        {
            get
            {
                return x;
            }
            set
            {
                x = value;
            }
        }
        public int Y
        {
            get
            {
                return y;
            }
            set
            {
                y = value;
            }
        }
        public Point Parent
        {
            get
            {
                return parent;
            }
            set
            {
                parent = value;
            }
        }
        public int Moves
        {
            get
            {
                return moves;
            }
            set
            {
                moves = value;
            }
        }
        public int MovesLeft
        {
            get
            {
                return movesLeft;
            }
            set
            {
                movesLeft = value;
            }
        }
        public int Rating
        {
            get
            {
                return Moves + MovesLeft;
            }
        }
        #endregion
    }
}
