Hola! Tengo un problema con mi código c++

Funciona bien todo hasta la 3era o cuarta repetición donde deja de preguntarle al usuario. Es un juego sencillo de cuenta hasta 30. Dejo el código abajo.

#include <iostream>
#include <stdlib.h>
#include <windows.h>
#include <mmsystem.h>
using namespace std;
int juego(int computadora , int jugador , int suma , int comprobacion);
 int computadora;
 int jugador;
 int suma;
 int comprobacion;
int main(){
PlaySound("bin\\Nyan Cat.wav", NULL, SND_FILENAME | SND_ASYNC);
system("color 2");
juego(computadora , jugador , suma , comprobacion);
}
int juego(int computadora , int jugador , int suma , int comprobacion){
for(jugador=5;jugador<=1||jugador>=3;){
cout<< "introduce un numero ";
cin>>jugador;
cin.ignore();
system("cls");
if(jugador>=1&&jugador<=3){
computadora=rand()%3+1;
suma=jugador+computadora;
system("color 3");
cout<< "la computadora subio el total a:" <<endl;
cout<<suma;
cin.ignore();
break;
}
else{
 system("color 4");
 cout<< "introduce un numero >= 1 y <= 3"<<endl;
 cin.get();
 system("cls");
}
}
for(suma=suma;suma<=26;){
if(jugador<=30&&suma<=30){
for(comprobacion==5;comprobacion<=1||comprobacion>=3;){
system("color 2");
cout<< "introduce un nuevo numero "<<endl;
cin>>comprobacion;
cin.ignore();
jugador=comprobacion;
system("cls");
if(comprobacion>3||comprobacion<1){
 system("color 4");
 cout<<"introduce un numero >= 1 y <= 3"<<endl;
 cin.get();
 system("cls");
}
else{
 break;
}
}
jugador=suma+jugador;
system("color 2");
cout<< "jugador subio la cuenta a:"<<endl;
cout<<jugador;
cin.get();
system("cls");
if(jugador<30){
system("color 3");
cout<< "la computadora subio la cuenta a:"<<endl;
computadora=rand()%3+1;
suma=jugador+computadora;
cout<<suma;
cin.get();
system("cls");
}
else{
 break;
}
}
else{
 break;
}
}
while(jugador!=30){
for(comprobacion==5;comprobacion<=1||comprobacion>=3;){
system("color 2");
cout<< "introduce otro numero "<<endl;
cin>>comprobacion;
cin.ignore();
jugador=comprobacion;
jugador=suma+jugador;
system("cls");
if(comprobacion>3||comprobacion<1){
 system("color 4");
 cout<<"introduce un numero >= 1 y <= 3"<<endl;
 cin.get();
 system("cls");
}
else{
 break;
}
}
 if(jugador>30){
 system("color 6");
 cout<< "no te pases de Pen..... 30 "<<endl;
 jugador=suma;
 cin.get();
 system("cls");
 }
 else{
 break;
 }
}
 if(jugador<=27){
if(jugador==27){
 computadora=3;
}
else if(jugador==28){
 computadora=2;
}
else if(jugador==29){
 computadora=1;
}
system("color 3");
cout<< "la computadora subio la cuenta a: "<<endl;
suma=jugador+computadora;
cout<<suma;
cin.get();
system("cls");
cout<< "perdiste la comPUTAdora es el amo tio! ";
return 0;
}
else if(jugador==30){
 cout<< "ganaste tio";
 cin.get();
 return 0;
}
} 

Añade tu respuesta

Haz clic para o