#include "StartLocation.h"
StartLocation::StartLocation()
{
	Reset();
}
StartLocation::~StartLocation()
{
}
const StartLocation& StartLocation::operator=	(const StartLocation &other)
{
	if(this != &other)
	{
		NickName		= other.NickName;
		SceneMapName	= other.SceneMapName;
		startX			= other.startX;
		startY			= other.startY;
	}
	return *this;
}
const StartLocation* StartLocation::operator=	(const StartLocation *other)
{
	if(this != other)
	{
		NickName		= other->NickName;
		SceneMapName	= other->SceneMapName;
		startX			= other->startX;
		startY			= other->startY;
	}
	return this;
}
void StartLocation::Reset()
{
	NickName		= "Assign_Name";
	SceneMapName	= "Pick_Map";
	startX			= -1;
	startY			= -1;
}
void StartLocation::SetNickName(string Name)
{
	string temp;
	if(int(Name.length()) > 0)
	{
		temp = Name;
		for(int i = 0; i < int(temp.length()); i++)
			if(temp[i] == ' ') temp[i] = '_';
		NickName = Name;
	}
	else NickName = "Assign_Name";
}
string StartLocation::GetNickName() const
{
	return NickName;
}
void StartLocation::SetScene(string SceneMap)
{
	string temp;
	if(SceneMap.length() > 0)
	{
		temp = SceneMap;
		//Make sure there are no blanks in file name - M. White 27 July, 2019
		for(int i = 0; i < int(temp.length()); i++) if(temp[i] == ' ') temp[i] = '_';
		SceneMapName = temp;
	}
	else SceneMapName = "Pick_Map";
}
string StartLocation::GetScene() const
{
	return SceneMapName;
}
void StartLocation::SetX(int data)
{
	if(data >= 0)	startX = data;
	else			startX = -1;
}
int StartLocation::GetX() const
{
	return startX;
}
void StartLocation::SetY(int data)
{
	if(data >= 0)	startY = data;
	else			startY = -1;
}
int StartLocation::GetY()
{
	return startY;
}