2 player tic tac toe with serial monitor

it's a program that allows 2 players to play through the serial monitor. The Arduino keeps track of who wins the game and who's turn it is. At the end of each game,it shows the winner, then starts a new game.

I can't get it to work thought and this is what I have so far.

int cadre = 0;

int posX = 0;
int posO = 0;
int posO1 = 0;
int posO2 = 0;
int posO3 = 0;
int posO4 = 0;
int posO5 = 0;
int posO6 = 0;
int posO7 = 0;
int posO8 = 0;
int posO9 = 0;
int posX1 = 0;
int posX2 = 0;
int posX3 = 0;
int posX4 = 0;
int posX5 = 0;
int posX6 = 0;
int posX7 = 0;
int posX8 = 0;
int posX9 = 0;

int randNombre;

String motRecu;

void setup(){

Serial.begin(9600);

Serial.println(" ");
Serial.println(" ");
Serial.println(" ");
Serial.println("TIC TAC TOE");
Serial.println("Tour de joueur X");

if(motRecu =("1X")){
posX = 1;
}
if(motRecu =("2X")){
posX = 2;
}
if(motRecu =("3X")){
posX = 3;
}
if(motRecu =("4X")){
posX = 4;
}
if(motRecu =("5X")){
posX = 5;
}
if(motRecu =("6X")){
posX = 6;
}
if(motRecu =("7X")){
posX = 7;
}
if(motRecu =("8X")){
posX = 8;
}
if(motRecu =("9X")){
posX = 9;
}

}

void loop(){
while(Serial.available()) {

if(posX == 1){
Serial.println(" ");
Serial.println(" ");
Serial.println(" ");
Serial.println("---------");
Serial.println(posX);

} else if(posX == 2){
Serial.println(" ");
Serial.println(" ");
Serial.println(" ");
Serial.println("---------");

} else if (posX == 3){
Serial.println(" ");
Serial.println(" ");
Serial.println(" ");
Serial.println("---------");

}else if (posX == 4){
Serial.println(" ");
Serial.println(" ");
Serial.println(" ");
Serial.println("---------");

} else if (posX == 5){
Serial.println(" ");
Serial.println(" ");
Serial.println(" ");
Serial.println("---------");
break;

} else if (posX == 6){
Serial.println(" ");
Serial.println(" ");
Serial.println(" ");
Serial.println("---------");

} else if (posX == 7){
Serial.println(" ");
Serial.println(" ");
Serial.println(" ");
Serial.println("---------");

} else if (posX == 8){
Serial.println(" ");
Serial.println(" ");
Serial.println(" ");
Serial.println("---------");
posX = 0;

}if (posX == 9){

Serial.println(" ");
Serial.println(" ");
Serial.println(" ");
Serial.println("---------");
posX = 0;

}
}
}

Why are you starting a new thread for the same question as this one? Cross posting wastes the time that people spent trying to help in the other post. The answers to the new post are likely to be the same as the older one.

Why haven't you read the how to use the forum-please read sticky like requested the the other post?