private Direction getNewDirectionFromPosition(Position primaryPos, Position secondaryPos) {
		int dirInt = getDirectionInt();
				
		if (rotation == Rotation.CLOCKWISE) {
			dirInt++;
			if (dirInt >= Direction.values().length)
				dirInt = 0;
		} else if (rotation == Rotation.COUNTER_CLOCKWISE) {
			dirInt--;
			if (dirInt <= -1)
				dirInt = Direction.values().length - 1;
		}
		return Direction.values()[dirInt];
	}