예제 #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);
};
예제 #2
0
bool King::LookNorth()
{
	Location temp = GetLocation();
	temp.MoveY(-1);

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