Ejemplo n.º 1
0
void King::Move(Direction myDirection)
{
	Location temp = GetLocation();
	if(myDirection == North)
		temp.MoveY(-1);
	else if (myDirection == East)
		temp.MoveZ(1);
	else if (myDirection == South)
		temp.MoveY(1);
	else if (myDirection == West)
		temp.MoveZ(-1);
	SetLocation(temp);
};
Ejemplo n.º 2
0
bool King::LookWest()
{
	Location temp = GetLocation();
	temp.MoveZ(-1);

	return GetLocation().IsWall(temp.GetCoordinates(), GetMaze());
};