public void UpdateXCoordinate(Direction direction) { if (direction.GetCurrentDirection() == 'E') { _xCoordinate++; } else if (direction.GetCurrentDirection() == 'W') { _xCoordinate--; } }
public void UpdateYCoordinate(Direction direction) { if (direction.GetCurrentDirection() == 'N') { _yCoordinate++; } else if (direction.GetCurrentDirection() == 'S') { _yCoordinate--; } }
public void UpdateCoordinatePosition() { switch (direction.GetCurrentDirection()) { case 'N': coordinates.UpdateYCoordinate(direction); break; case 'S': coordinates.UpdateYCoordinate(direction); break; case 'E': coordinates.UpdateXCoordinate(direction); break; case 'W': coordinates.UpdateXCoordinate(direction); break; } }