este es el programa
#include<conio.h>
#include<iostream.h>
#include<stdlib.h>
#include<time.h>
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
int numAleatorio(int n);
#define VACIO 0
#define CARA 1 //máquina
#define CRUZ 2 //usuario
#define TIRAR 1 //máquina
#define TAPAR 2 //usuario
#define CELDA_1_ESQ 1
#define CELDA_2_MED 2
#define CELDA_3_ESQ 3
#define CELDA_4_MED 4
#define CELDA_5_CENTRO 5
#define CELDA_6_MED 6
#define CELDA_7_ESQ 7
#define CELDA_8_MED 8
#define CELDA_9_ESQ 9
#define NO_TIRO 0
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
cGato::cGato()
{
ReiniciarJuego();
}
CGato::~CGato()
{
}
void CGato::ReiniciarJuego(void)
{
int i;
for(i=0;i<12;i++)
m_celda[i]=VACIO;
m_posUltimoTiroMaq=m_posUltimoTiroUs=0;
m_posPrimerTiro=0;
m_lineaGanadora=m_statusJuego=0;
m_primerTirador=0;
}
void CGato::JuegoEntrada(int posUs)
{
verificarTermino();
m_posUltimoTiroMaq=m_posUltimoTiroUs=0;
if(posUs<1||posUs>9||m_statusJuego||m_celda[posUs])
return;
//TIRA USUARIO
m_celda[posUs]=CRUZ;
m_posUltimoTiroUs=posUs;
//TIRA MAQUINA
m_posUltimoTiroMaq=TiroMaquina();
m_celda[m_posUltimoTiroMaq]=CARA;
verificarTermino();
}
int CGato::TiroMaquina(void)
{
verificarTermino();
PosPrimerTiro();
int x;
if((x=TiroObligadoMaq()))
return x;
if((x=TiroCondMaqDefensa()))
return x;
if((x=TiroCondMaqAtaque()))
return x;
if((x=BuscaMejorEsquina(TAPAR))) //tapar
return x;
if((x=BuscaMejorEsquina(TIRAR))) //tirar
return x;
if((x=BuscaMejorPosMedios(TIRAR)))
return x;
if((x=BuscaMejorPosLineal()))
return x;
return DefaultTiro();
}
//////////////////////////////////
int CGato::TiroObligadoMaq(void)
{
if(m_statusJuego)
return NO_TIRO;
int x,i;
int n[]={1,5,9, 3,5,7, 1,2,3, 4,5,6,
7,8,9, 1,4,7, 2,5,8, 3,6,9};
//PRIMERO BUSCA GANAR (PRIORIDAD)
for(i=0;i<24-2;i+=3)
if((x=BuscaGanarTapar(n[i],n[i+1],n[i+2])))
return x;
//SEGUNDO BUSCA TAPAR
for(i=0;i<24-2;i+=3)
if((x=BuscaGanarTapar(n[i],n[i+1],n[i+2],-1)))
return x;
return NO_TIRO;
}
////////////////////////////////////
int CGato::TiroCondMaqDefensa(void)
{
if(m_statusJuego||m_primerTirador==CARA)//Si inicio la maquina, sale
return NO_TIRO;
int x;
//REGLA 1
if(EsEsquina(m_posPrimerTiro))
{
if(NumTiros()==1)
return CELDA_5_CENTRO;//m_celda central
else
{
if((x=BuscaMejorPosMedios(TAPAR)))
return x;
}
}
//REGLA 2
if(m_posPrimerTiro==CELDA_5_CENTRO)
{
int i=0,aux[5],k,esq[]={1,3,7,9};
//tira siempre en esquinas
for(k=0;k<4;k++)
if(m_celda[esq[k]]==VACIO)
aux[i++]=esq[k];
if(i>0)
return aux[numAleatorio(i)];
}
//REGLA 3
if(EsMedio(m_posPrimerTiro))
{
if(NumTiros()==1)
return CELDA_5_CENTRO;//m_celda central
if(NumTiros()==3)
{//mejor medio si hay
if((x=BuscaMejorPosMedios(TAPAR)))
return x;
}
}
return NO_TIRO;
}
////////////////////////////////////
void CGato::verificarTermino(void)
{
// if(m_statusJuego)
// return;
int i,linea=0;
int n[]={1,5,9, 3,5,7, 1,2,3, 4,5,6,
7,8,9, 1,4,7, 2,5,8, 3,6,9};
for(i=0;i<24-2;i+=3)
{
linea++;
if(ChecarGanador(n[i],n[i+1],n[i+2]))
{
m_lineaGanadora=linea;
return;
}
}
for(i=1;i<10;i++)
{
if(m_celda[i]==VACIO)
break;
if(i==9)
{//si están todas llenas, terminar
m_statusJuego=NADIE_GANO; //nadie ganó
m_lineaGanadora=0;
}
}
}
int CGato::ChecarGanador(const int&a,const int&b,const int&c)
{
if(m_celda[a]==m_celda[b]&&m_celda[b]==m_celda[c])
{
if(m_celda[a]==CARA)
return m_statusJuego=GANA_MAQ;//maquina
if(m_celda[a]==CRUZ)
return m_statusJuego=GANA_USU;//usuario
}
return 0;
}
int CGato::BuscaGanarTapar(const int &a,const int &b,const int &c,
const int &identificador)
{
int cont=0,signo=CARA; //máquina
if(identificador)
signo=CRUZ; //usuario
if(m_celda[a]==signo) cont++;
if(m_celda[b]==signo) cont++;
if(m_celda[c]==signo) cont++;
if(cont>2)
{
if(signo=CARA)
m_statusJuego=GANA_MAQ;//gana máquina
else
m_statusJuego=GANA_USU;//gana usuario
return NO_TIRO; //si alguien ganó, terminar
}
if(cont==2) //posUs de gane
{
if(m_celda[a]==VACIO)
return a;
if(m_celda[b]==VACIO)
return b;
if(m_celda[c]==VACIO)
return c;
}
return NO_TIRO; //NO HAY A QUIEN TAPAR
}
int CGato::NumTiros(void)
{
int i,cont=0;
for(i=1;i<10;i++)
if(m_celda[i]!=VACIO)
cont++;
return cont;
}
void CGato::PosPrimerTiro(void)
{
int i;
if(m_posPrimerTiro==0)
if(NumTiros()==1)
for(i=1;i<10;i++)
if(m_celda[i]!=VACIO)
{
m_posPrimerTiro=i;
m_primerTirador=m_celda[i];
}
}
int CGato::EsEsquina(const int &n)
{
return n==1||n==3||n==7||n==9;
}
int CGato::EsMedio(const int &n)
{
return n==2||n==4||n==6||n==8;
}
int CGato::StatusJuego(void)
{
return m_statusJuego;
}
int CGato::posTiroMaq(void)
{
return m_posUltimoTiroMaq;
}
int CGato::posTiroUsu(void)
{
return m_posUltimoTiroUs;
}
int CGato::lineaGanadora(void)
{
return m_lineaGanadora;
}
int numAleatorio(int n)
{
srand((unsigned)time(NULL));//semilla
return rand()%n;
}
void CGato::primerTiroInicialMaq(void)
{
int x=numAleatorio(9)+1;
ReiniciarJuego();
m_celda[x]=CARA;
m_posPrimerTiro=m_posUltimoTiroMaq=x;
m_primerTirador=CARA;
}
int CGato::MejorPosMedios(void)
{
int x;
//mejor posicion medios
if(numAleatorio(2))
{
if((x=MejorPosLineal(2,5,8)))
return x;
if((x=MejorPosLineal(4,5,6)))
return x;
}
else
{
if((x=MejorPosLineal(4,5,6)))
return x;
if((x=MejorPosLineal(2,5,8)))
return x;
}
return 0;
}
int CGato::BuscaMejorPosLineal(void)
{
int x,i;
int n[]={1,5,9, 3,5,7, 1,2,3, 4,5,6,
7,8,9, 1,4,7, 2,5,8, 3,6,9};
for(i=0;i<24-2;i+=3)
if((x=MejorPosLineal(n[i],n[i+1],n[i+2])))
return x;
return NO_TIRO;
}
int CGato::MejorPosLineal(const int &a,const int &b,const int &c)
{
int cont=0;//MÁQUINA
if(m_celda[a]==VACIO) cont++;
if(m_celda[b]==VACIO) cont++;
if(m_celda[c]==VACIO) cont++;
if(cont==2) //posUs de gane
{
if(m_celda[a]==CARA)
{
if(numAleatorio(2))
return b;
return c;
}
if(m_celda[b]==CARA)
{
if(numAleatorio(2))
return a;
return c;
}
if(m_celda[c]==CARA)
{
if(numAleatorio(2))
return a;
return b;
}
}
return NO_TIRO;
}
int CGato::DefaultTiro(void)
{
int aux[10];
int x,i=0;
for(x=1;x<10;x++)
{
if(m_celda[x]==VACIO)
aux[i++]=x;
}
if(i>0)
return aux[numAleatorio(i)];
m_statusJuego=NADIE_GANO;
return NO_TIRO;
}
int CGato::HayUnaVacia(const int&a,const int&b,const int&caraCruz)
{
return (m_celda[a]==VACIO&&m_celda[b]==caraCruz)||
(m_celda[b]==VACIO&&m_celda[a]==caraCruz);
}
int CGato::BuscaMejorEsquina(const int &caraCruz) //para tapar
{
//personalizar...
return NO_TIRO;
}
int CGato::BuscaMejorPosMedios(const int &caraCruz) //para tapar
{
//tapar CRUZ, tirar CIRCULO
//personalizar...
return MejorPosMedios();
}
/////////////////////////////////////
int CGato::TiroCondMaqAtaque(void)
{
if(m_statusJuego||m_primerTirador==CRUZ)//si inicio el usuario, sale
return NO_TIRO;
//REGLA 1
if(EsEsquina(m_posPrimerTiro))
{
if(NumTiros()==2)
{
if(EsEsquina(m_posUltimoTiroUs))
{
int x;
if((x=BuscaMejorEsquina(TIRAR)))
return x;
//personalizar...
}
if(m_posUltimoTiroUs==5)
{
if(m_posPrimerTiro==1)
return 9; //la opuesta
if(m_posPrimerTiro==9)
return 1; //la opuesta
if(m_posPrimerTiro==3)
return 7; //la opuesta
if(m_posPrimerTiro==7)
return 3; //la opuesta
}
}
}
//REGLA 2
if(m_posPrimerTiro==CELDA_5_CENTRO)
{
if(NumTiros()==2)
if(EsEsquina(m_posUltimoTiroUs))
{
//personalizar...
}
}
//REGLA 3
if(EsMedio(m_posPrimerTiro))
{
if(NumTiros()==2&&m_celda[5]==VACIO)
return CELDA_5_CENTRO;//m_celda central
}
return NO_TIRO;
}
////////////////////////////////////////////////////////////////////
void CGato::Ver(void)
{
int i,n;
int aux[]={7,8,9,4,5,6,1,2,3};
for(n=0;n<9;n++)
{
i=aux[n];
if(i==1||i==4||i==7)
cout<<endl;
if(m_celda[i]==CARA)
cout<<" 0 ";
else if(m_celda[i]==CRUZ)
cout<<" X ";
else
cout<<" . ";
}
cout<<endl<<endl;
}
int main()
{
CGato g;
char aux[2];
system("CLS");
cout<<"JUEGO DEL GATO"<<endl<<endl;
cout<<"Usuario: XnM quina: 0n"<<endl;
cout<<" 7 8 9"<<endl;
cout<<" 4 5 6"<<endl;
cout<<" 1 2 3"<<endl;
g.Ver();
aux[1]=0;
do
{
while((aux[0]=getch())<'1'||aux[0]>'9');
g.JuegoEntrada(atoi(aux));
g.Ver();
}
while(!g.StatusJuego());
cout<<endl<<endl;
if(g.StatusJuego()==GANA_MAQ)
cout<<"GANA LA MAQUINA"<<endl;
else if(g.StatusJuego()==GANA_USU)
cout<<"GANA EL USUARIO"<<endl;
else
cout<<"NADIE GANA"<<endl;
getch();
return 0;
}
void autor(void)
{
system("cls");
cout<<"UNIVERSIDAD NACIONAL AUTàNOMA DE MXICO"<<endl;
cout<<"FACULTAD DE INGENIERÖA"<<endl<<endl;
cout<<"PROGRAMA: Juego del Gato (Versión DEMO en MS-DOS)"<<endl;
cout<<"AUTOR: Antonio A."<<endl;
cout<<"DIRECCIàN: http://mx.geocities.com/ayudacpp"<<endl;
getch();
}
#include<iostream.h>
#include<stdlib.h>
#include<time.h>
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
int numAleatorio(int n);
#define VACIO 0
#define CARA 1 //máquina
#define CRUZ 2 //usuario
#define TIRAR 1 //máquina
#define TAPAR 2 //usuario
#define CELDA_1_ESQ 1
#define CELDA_2_MED 2
#define CELDA_3_ESQ 3
#define CELDA_4_MED 4
#define CELDA_5_CENTRO 5
#define CELDA_6_MED 6
#define CELDA_7_ESQ 7
#define CELDA_8_MED 8
#define CELDA_9_ESQ 9
#define NO_TIRO 0
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
cGato::cGato()
{
ReiniciarJuego();
}
CGato::~CGato()
{
}
void CGato::ReiniciarJuego(void)
{
int i;
for(i=0;i<12;i++)
m_celda[i]=VACIO;
m_posUltimoTiroMaq=m_posUltimoTiroUs=0;
m_posPrimerTiro=0;
m_lineaGanadora=m_statusJuego=0;
m_primerTirador=0;
}
void CGato::JuegoEntrada(int posUs)
{
verificarTermino();
m_posUltimoTiroMaq=m_posUltimoTiroUs=0;
if(posUs<1||posUs>9||m_statusJuego||m_celda[posUs])
return;
//TIRA USUARIO
m_celda[posUs]=CRUZ;
m_posUltimoTiroUs=posUs;
//TIRA MAQUINA
m_posUltimoTiroMaq=TiroMaquina();
m_celda[m_posUltimoTiroMaq]=CARA;
verificarTermino();
}
int CGato::TiroMaquina(void)
{
verificarTermino();
PosPrimerTiro();
int x;
if((x=TiroObligadoMaq()))
return x;
if((x=TiroCondMaqDefensa()))
return x;
if((x=TiroCondMaqAtaque()))
return x;
if((x=BuscaMejorEsquina(TAPAR))) //tapar
return x;
if((x=BuscaMejorEsquina(TIRAR))) //tirar
return x;
if((x=BuscaMejorPosMedios(TIRAR)))
return x;
if((x=BuscaMejorPosLineal()))
return x;
return DefaultTiro();
}
//////////////////////////////////
int CGato::TiroObligadoMaq(void)
{
if(m_statusJuego)
return NO_TIRO;
int x,i;
int n[]={1,5,9, 3,5,7, 1,2,3, 4,5,6,
7,8,9, 1,4,7, 2,5,8, 3,6,9};
//PRIMERO BUSCA GANAR (PRIORIDAD)
for(i=0;i<24-2;i+=3)
if((x=BuscaGanarTapar(n[i],n[i+1],n[i+2])))
return x;
//SEGUNDO BUSCA TAPAR
for(i=0;i<24-2;i+=3)
if((x=BuscaGanarTapar(n[i],n[i+1],n[i+2],-1)))
return x;
return NO_TIRO;
}
////////////////////////////////////
int CGato::TiroCondMaqDefensa(void)
{
if(m_statusJuego||m_primerTirador==CARA)//Si inicio la maquina, sale
return NO_TIRO;
int x;
//REGLA 1
if(EsEsquina(m_posPrimerTiro))
{
if(NumTiros()==1)
return CELDA_5_CENTRO;//m_celda central
else
{
if((x=BuscaMejorPosMedios(TAPAR)))
return x;
}
}
//REGLA 2
if(m_posPrimerTiro==CELDA_5_CENTRO)
{
int i=0,aux[5],k,esq[]={1,3,7,9};
//tira siempre en esquinas
for(k=0;k<4;k++)
if(m_celda[esq[k]]==VACIO)
aux[i++]=esq[k];
if(i>0)
return aux[numAleatorio(i)];
}
//REGLA 3
if(EsMedio(m_posPrimerTiro))
{
if(NumTiros()==1)
return CELDA_5_CENTRO;//m_celda central
if(NumTiros()==3)
{//mejor medio si hay
if((x=BuscaMejorPosMedios(TAPAR)))
return x;
}
}
return NO_TIRO;
}
////////////////////////////////////
void CGato::verificarTermino(void)
{
// if(m_statusJuego)
// return;
int i,linea=0;
int n[]={1,5,9, 3,5,7, 1,2,3, 4,5,6,
7,8,9, 1,4,7, 2,5,8, 3,6,9};
for(i=0;i<24-2;i+=3)
{
linea++;
if(ChecarGanador(n[i],n[i+1],n[i+2]))
{
m_lineaGanadora=linea;
return;
}
}
for(i=1;i<10;i++)
{
if(m_celda[i]==VACIO)
break;
if(i==9)
{//si están todas llenas, terminar
m_statusJuego=NADIE_GANO; //nadie ganó
m_lineaGanadora=0;
}
}
}
int CGato::ChecarGanador(const int&a,const int&b,const int&c)
{
if(m_celda[a]==m_celda[b]&&m_celda[b]==m_celda[c])
{
if(m_celda[a]==CARA)
return m_statusJuego=GANA_MAQ;//maquina
if(m_celda[a]==CRUZ)
return m_statusJuego=GANA_USU;//usuario
}
return 0;
}
int CGato::BuscaGanarTapar(const int &a,const int &b,const int &c,
const int &identificador)
{
int cont=0,signo=CARA; //máquina
if(identificador)
signo=CRUZ; //usuario
if(m_celda[a]==signo) cont++;
if(m_celda[b]==signo) cont++;
if(m_celda[c]==signo) cont++;
if(cont>2)
{
if(signo=CARA)
m_statusJuego=GANA_MAQ;//gana máquina
else
m_statusJuego=GANA_USU;//gana usuario
return NO_TIRO; //si alguien ganó, terminar
}
if(cont==2) //posUs de gane
{
if(m_celda[a]==VACIO)
return a;
if(m_celda[b]==VACIO)
return b;
if(m_celda[c]==VACIO)
return c;
}
return NO_TIRO; //NO HAY A QUIEN TAPAR
}
int CGato::NumTiros(void)
{
int i,cont=0;
for(i=1;i<10;i++)
if(m_celda[i]!=VACIO)
cont++;
return cont;
}
void CGato::PosPrimerTiro(void)
{
int i;
if(m_posPrimerTiro==0)
if(NumTiros()==1)
for(i=1;i<10;i++)
if(m_celda[i]!=VACIO)
{
m_posPrimerTiro=i;
m_primerTirador=m_celda[i];
}
}
int CGato::EsEsquina(const int &n)
{
return n==1||n==3||n==7||n==9;
}
int CGato::EsMedio(const int &n)
{
return n==2||n==4||n==6||n==8;
}
int CGato::StatusJuego(void)
{
return m_statusJuego;
}
int CGato::posTiroMaq(void)
{
return m_posUltimoTiroMaq;
}
int CGato::posTiroUsu(void)
{
return m_posUltimoTiroUs;
}
int CGato::lineaGanadora(void)
{
return m_lineaGanadora;
}
int numAleatorio(int n)
{
srand((unsigned)time(NULL));//semilla
return rand()%n;
}
void CGato::primerTiroInicialMaq(void)
{
int x=numAleatorio(9)+1;
ReiniciarJuego();
m_celda[x]=CARA;
m_posPrimerTiro=m_posUltimoTiroMaq=x;
m_primerTirador=CARA;
}
int CGato::MejorPosMedios(void)
{
int x;
//mejor posicion medios
if(numAleatorio(2))
{
if((x=MejorPosLineal(2,5,8)))
return x;
if((x=MejorPosLineal(4,5,6)))
return x;
}
else
{
if((x=MejorPosLineal(4,5,6)))
return x;
if((x=MejorPosLineal(2,5,8)))
return x;
}
return 0;
}
int CGato::BuscaMejorPosLineal(void)
{
int x,i;
int n[]={1,5,9, 3,5,7, 1,2,3, 4,5,6,
7,8,9, 1,4,7, 2,5,8, 3,6,9};
for(i=0;i<24-2;i+=3)
if((x=MejorPosLineal(n[i],n[i+1],n[i+2])))
return x;
return NO_TIRO;
}
int CGato::MejorPosLineal(const int &a,const int &b,const int &c)
{
int cont=0;//MÁQUINA
if(m_celda[a]==VACIO) cont++;
if(m_celda[b]==VACIO) cont++;
if(m_celda[c]==VACIO) cont++;
if(cont==2) //posUs de gane
{
if(m_celda[a]==CARA)
{
if(numAleatorio(2))
return b;
return c;
}
if(m_celda[b]==CARA)
{
if(numAleatorio(2))
return a;
return c;
}
if(m_celda[c]==CARA)
{
if(numAleatorio(2))
return a;
return b;
}
}
return NO_TIRO;
}
int CGato::DefaultTiro(void)
{
int aux[10];
int x,i=0;
for(x=1;x<10;x++)
{
if(m_celda[x]==VACIO)
aux[i++]=x;
}
if(i>0)
return aux[numAleatorio(i)];
m_statusJuego=NADIE_GANO;
return NO_TIRO;
}
int CGato::HayUnaVacia(const int&a,const int&b,const int&caraCruz)
{
return (m_celda[a]==VACIO&&m_celda[b]==caraCruz)||
(m_celda[b]==VACIO&&m_celda[a]==caraCruz);
}
int CGato::BuscaMejorEsquina(const int &caraCruz) //para tapar
{
//personalizar...
return NO_TIRO;
}
int CGato::BuscaMejorPosMedios(const int &caraCruz) //para tapar
{
//tapar CRUZ, tirar CIRCULO
//personalizar...
return MejorPosMedios();
}
/////////////////////////////////////
int CGato::TiroCondMaqAtaque(void)
{
if(m_statusJuego||m_primerTirador==CRUZ)//si inicio el usuario, sale
return NO_TIRO;
//REGLA 1
if(EsEsquina(m_posPrimerTiro))
{
if(NumTiros()==2)
{
if(EsEsquina(m_posUltimoTiroUs))
{
int x;
if((x=BuscaMejorEsquina(TIRAR)))
return x;
//personalizar...
}
if(m_posUltimoTiroUs==5)
{
if(m_posPrimerTiro==1)
return 9; //la opuesta
if(m_posPrimerTiro==9)
return 1; //la opuesta
if(m_posPrimerTiro==3)
return 7; //la opuesta
if(m_posPrimerTiro==7)
return 3; //la opuesta
}
}
}
//REGLA 2
if(m_posPrimerTiro==CELDA_5_CENTRO)
{
if(NumTiros()==2)
if(EsEsquina(m_posUltimoTiroUs))
{
//personalizar...
}
}
//REGLA 3
if(EsMedio(m_posPrimerTiro))
{
if(NumTiros()==2&&m_celda[5]==VACIO)
return CELDA_5_CENTRO;//m_celda central
}
return NO_TIRO;
}
////////////////////////////////////////////////////////////////////
void CGato::Ver(void)
{
int i,n;
int aux[]={7,8,9,4,5,6,1,2,3};
for(n=0;n<9;n++)
{
i=aux[n];
if(i==1||i==4||i==7)
cout<<endl;
if(m_celda[i]==CARA)
cout<<" 0 ";
else if(m_celda[i]==CRUZ)
cout<<" X ";
else
cout<<" . ";
}
cout<<endl<<endl;
}
int main()
{
CGato g;
char aux[2];
system("CLS");
cout<<"JUEGO DEL GATO"<<endl<<endl;
cout<<"Usuario: XnM quina: 0n"<<endl;
cout<<" 7 8 9"<<endl;
cout<<" 4 5 6"<<endl;
cout<<" 1 2 3"<<endl;
g.Ver();
aux[1]=0;
do
{
while((aux[0]=getch())<'1'||aux[0]>'9');
g.JuegoEntrada(atoi(aux));
g.Ver();
}
while(!g.StatusJuego());
cout<<endl<<endl;
if(g.StatusJuego()==GANA_MAQ)
cout<<"GANA LA MAQUINA"<<endl;
else if(g.StatusJuego()==GANA_USU)
cout<<"GANA EL USUARIO"<<endl;
else
cout<<"NADIE GANA"<<endl;
getch();
return 0;
}
void autor(void)
{
system("cls");
cout<<"UNIVERSIDAD NACIONAL AUTàNOMA DE MXICO"<<endl;
cout<<"FACULTAD DE INGENIERÖA"<<endl<<endl;
cout<<"PROGRAMA: Juego del Gato (Versión DEMO en MS-DOS)"<<endl;
cout<<"AUTOR: Antonio A."<<endl;
cout<<"DIRECCIàN: http://mx.geocities.com/ayudacpp"<<endl;
getch();
}
