Programming an automatic card dealing machine

I am a college student trying to program my card dealing device to have a stepper motor rotate 90 degrees and stop. From there I need a DC motor to run until a light sensor tells it to stop. When the light sensor is no longer active then I need the stepper motor to rotate another 90 degrees and this same process to repeat. I need this to happen 12 times.

Here is a list to my motors and sensors:

Below is the code that I have so far. I have comments inserted where I am lost. If someone could edit my code or insert some code that will help me get on the right track. I am really struggling.

//necessary to run stepper motor
#include <Stepper.h>
//these are the the pins where the stepper motor will be located
int in1Pin = 12;
int in2Pin = 11;
int in3Pin = 10;
int in4Pin = 9;

//how many steps for a full revolution for stepper motor
Stepper motor(200, in1Pin, in2Pin, in3Pin, in4Pin);  

void setup() {
pinMode(3,INPUT_PULLUP); //sensor
pinMode(8,OUTPUT); //DC motor

pinMode(in1Pin, OUTPUT);
pinMode(in2Pin, OUTPUT);
pinMode(in3Pin, OUTPUT);
pinMode(in4Pin, OUTPUT);

Serial.begin(9600); 
//push the button on the device to start (WE NEED TO DO THIS)
motor.setSpeed(Change as fit);//don't know if this is right
}

void loop() {

//make for loop here that tells stepper motor to rotate 90 degrees when code below is complete (WE NEED TO DO THIS)
// While the sensor is not detecting a card, it will run the motor.
while(pinMode(3)==LOW){
  pinMode(8,HIGH);
}
pinMode(8,LOW); //stops motor after sensor is no longer low. 

}

// how will we have this process repeat 12 times?
//necessary to run stepper motor
#include <Stepper.h>

//these are the the pins where the stepper motor will be located
const int in1Pin = 12;
const int in2Pin = 11;
const int in3Pin = 10;
const int in4Pin = 9;

const int sensorPin = 3;
const int motorPin = 8;

const int StepsPerRevolution = 200;

//how many steps for a full revolution for stepper motor
Stepper stepper(StepsPerRevolution, in1Pin, in2Pin, in3Pin, in4Pin);

void setup() {
  pinMode(sensorPin, INPUT_PULLUP); //sensor
  pinMode(motorPin, OUTPUT); //DC motor

  pinMode(in1Pin, OUTPUT);
  pinMode(in2Pin, OUTPUT);
  pinMode(in3Pin, OUTPUT);
  pinMode(in4Pin, OUTPUT);

  Serial.begin(9600);
  //push the button on the device to start (WE NEED TO DO THIS)
  stepper.setSpeed(Change as fit);  //don't know if this is right

  // Repeat 12 times:
  for (int  i = 0; i < 12; i++) {
    // Move stepper motor 90 degrees
    stepper.move(StepsPerRevolution / 4);
    // While the sensor is not detecting a card, it will run the motor.
    digitalWrite(motorPin, HIGH); // Start the motor
    while (digitalRead(sensorPin) == LOW) {}
    digitalWrite(motorPin, LOW); //stops motor after sensor is no longer low.
  }
}

void loop() {
}
while(pinMode(3)==LOW){

pinMode() takes two arguments. It does NOT return a value.

  pinMode(8,HIGH);

pinMode() defines whether a pin is INPUT, OUTPUT, or INPUT_PULLUP. HIGH is not one of the choices. Setting the mode of the pin over and over is useless.

Posting code that won't even compile wastes everyone's time, unless the problem is that the code won't compile and you need help with making it compile. If that were the case, you'd have posted the errors instead of pretending that the code compiled.