#include "PathNode.h"
PathNode::PathNode()
{
	Reset();
}
PathNode::~PathNode()
{
}
void PathNode::Reset()
{
	//-1's are used to test during node assignment for the lead and following node differences - M. White 0 August, 2019
	X = Y = Dir = -1;
}
const PathNode& PathNode::operator= (const PathNode &other)
{
	if(this != &other)
	{
		X	= other.X;
		Y	= other.Y;
		Dir	= other.Dir;
	}//end: if(this != &other)
	return *this;
}
const PathNode* PathNode::operator= (const PathNode *other)
{
	if(this != other)
	{
		X	= other->X;
		Y	= other->Y;
		Dir	= other->Dir;
	}
	return this;
}
void PathNode::SetX(int data)
{
	if(data >= 0)	X = data;
	else			X = -1;
}
int PathNode::GetX() const
{
	return X;
}
void PathNode::SetY(int data)
{
	if(data >= 0)	Y = data;
	else			Y = -1;
}
int PathNode::GetY() const
{
	return Y;
}
void PathNode::SetDir(int data)
{
	if(data >= 0)	Dir = data;
	else			Dir = -1;
}
int PathNode::GetDir() const
{
	return Dir;
}