Avoiding some repetition by refactoring turnRight and turnLeft