Please help me regarding this set of code

To have a quick discussion about our project, we've been trying to make a game that has an 3x3 LED display, and the player must shoot a ball through the basket that corresponds the LED, there's a microswitch attached to the basket that will detect if the ball already passed through, my problem is, it reads the first value, but not the second one. Any thoughts? Thanks in advance.

The 'pass[]' array is where the randomized value is stored, I put +13 there since the pins 14-22 corresponds to the pins of switches, and 23-31 is the pins for the LEDs.

CD.start(10);
   while ( CD.remaining() != 0 )
   {
     while ( a != 1 && b != 1 && c != 1 )
     {
      a=digitalRead(pass[0]+13);
      b=digitalRead(pass[1]+13);
      c=digitalRead(pass[2]+13);
      if(a==1){
        digitalWrite(pass[0]+22,LOW);
      }
      if(b==1){
        digitalWrite(pass[1]+22,LOW);
      }
      if(c==1){
        digitalWrite(pass[2]+22,LOW);
      }
     }
   }

Well, that code looks very mysterious. Please post the entire sketch, in code tags please. Please also document the Magic Numbers 13 and 22.

Sorry for that, here you go.

#include <CountDown.h>
#include <LiquidCrystal.h>
LiquidCrystal lcd(12,11,5,4,3,2);
CountDown CD(CountDown::SECONDS);
byte switchval[] = {};
int meh;
void setup() {
  // put your setup code here, to run once:
   for (int a = 23 ; a <= 31 ; a++)
   {
      pinMode(a,OUTPUT);
   }
   for (int b = 14 ; b <= 22 ; b++)
   {
    pinMode(b,INPUT_PULLUP);
   }
   Serial.begin(9600);
   lcd.begin(16,2);
}
bool gameover = false;
   int value = 22 ;
   byte pass[] = {};
   bool duplicateFound = true;
   byte duplicateCounter;
   int a, b, c;
void loop() {
  // put your main code here, to run repeatedly:
    lcd.setCursor(0,0);
    lcd.print("Game Start!");
   while ( gameover != true )
   {
    for ( int x = 0; x <= 2 ; x++ )
    {
      duplicateFound = true;
      while ( duplicateFound == true )
      {
        pass[x] = random(1,10);
        duplicateFound = false;
        for ( int y = 0 ; y < x ; y++ )
        {
          if ( pass[x] == pass[y] )
          {
            duplicateFound = true;
            duplicateCounter++;
          }
        }  
      }
      Serial.println(pass[x]);
      digitalWrite(pass[x]+value,HIGH);
    }
   CD.start(10);
   while ( CD.remaining() != 0 )
   {
     while ( a != 1 && b != 1 && c != 1 )
     {
      a=digitalRead(pass[0]+13);
      b=digitalRead(pass[1]+13);
      c=digitalRead(pass[2]+13);
      if(a==1){
        digitalWrite(pass[0]+22,LOW);
      }
      if(b==1){
        digitalWrite(pass[1]+22,LOW);
      }
      if(c==1){
        digitalWrite(pass[2]+22,LOW);
      }
     }
   }
}
}