Problem with line following robot

I wrote the code for a line following robot recently and it's weird because the right wheel of the robot moves backwards and the left wheel moves forward when it's supposed to go forward. However the robot moves right and left properly(the wheels move how it's programmed to. I've used two infared receivers/transmitter modules. Please tell what's wrong!

Look at the code:

int const RS = A0;
int const LS= A3;
#include <AFMotor.h>
AF_DCMotor r_motor(3);
AF_DCMotor l_motor(4);
void setup(){
  Serial.begin(9600);
  pinMode(RS, INPUT);
  pinMode(LS, INPUT);
  
}

void loop(){

  bool r_state = digitalRead(A0);
  bool l_state = digitalRead(A3);
  

      if((r_state == true) && (l_state == true)){
        Strght();
      }
       if((r_state == true) && (l_state == false)){
        Turn_Right();
      }
       if((l_state == true) && (r_state == false)){
        Turn_Left();
      }
       if(l_state && r_state){
        Stop();
      }
 
}

void Strght(){
    l_motor.setSpeed(200);
    r_motor.setSpeed(200);
    r_motor.run(FORWARD);
    l_motor.run(FORWARD);
  
}

void Turn_Right(){
   
      r_motor.setSpeed(200);
      l_motor.setSpeed(200);
      r_motor.run(FORWARD);
      l_motor.run(BACKWARD); 
   }
void Turn_Left(){

    l_motor.setSpeed(200);  
    r_motor.setSpeed(200);
    l_motor.run(FORWARD);
    r_motor.run(BACKWARD);
}

void Stop(){
    l_motor.setSpeed(0);
    r_motor.setSpeed(0);
    r_motor.run(RELEASE);
    l_motor.run(RELEASE);
}

You are both calling Strght() and Stop() if both buttons read as true/high.

You meant to call Stop() if both buttons are false/low?

Do the two ir transmitter / receiver really work simultaneously?

MarkT:
You are both calling Strght() and Stop() if both buttons read as true/high.

You meant to call Stop() if both buttons are false/low?

Silly me. I'll change it and let you know what happens

The same thing happens!! I changed the code also. When a black line is detected(when the sensor doesn't detect anything) true/1 is returned whereas 0/false is returned when the sensor is above a lighter surface. Please tell me what's wrong

int const RS = A0; // Right sensor connected to pin A0
int const LS= A3;  // Left sensor connected to pin A3

#include <AFMotor.h>
AF_DCMotor r_motor(3); // Right motor connected to port 3
AF_DCMotor l_motor(4); // Left motor connected to port 4

void setup(){
  Serial.begin(9600);
  pinMode(RS, INPUT); 
  pinMode(LS, INPUT);
  //Intitializing pin A0 and A3 as inputs
 }

void loop(){

  bool r_state = digitalRead(A0);
  bool l_state = digitalRead(A3);
  

      if((r_state == false) && (l_state == false)){
        Straight();
      }
       if((r_state == true) && (l_state == false)){
        Turn_Right();
      }
       if((l_state == true) && (r_state == false)){
        Turn_Left();
      }
       if(l_state && r_state  ){
        Stop();
      }
 
}

void Straight(){
    l_motor.setSpeed(200);
    r_motor.setSpeed(200);
    r_motor.run(FORWARD);
    l_motor.run(FORWARD);
  }
void Turn_Right(){
   
      r_motor.setSpeed(200);
      l_motor.setSpeed(200);
      r_motor.run(FORWARD);
      l_motor.run(BACKWARD); 
   }
void Turn_Left(){

    l_motor.setSpeed(200);  
    r_motor.setSpeed(200);
    l_motor.run(FORWARD);
    r_motor.run(BACKWARD);
}
void Stop(){
    l_motor.setSpeed(0);
    r_motor.setSpeed(0);
    r_motor.run(RELEASE);
    l_motor.run(RELEASE);
}

You are reading an analog sensor as a digital one? That's not ideal.

I'm using the Adafruit motor shield the only way for me to connect the sensors is to connect it to the Analog pins. The sensors still work though. You think the problem is with the way the motors are connected?