#include <winbgim.h>
#include <stdio.h>
// #include <graphics.h>
#include <math.h>
#include <time.h>
#include <dos.h>
//Esta funcion dibuja la interfaz del juego
void letras(int x,int y)
{
int numero;
numero=rand()%25;
if (numero == 0)
outtextxy(x-20, y-20 ,"A");
if (numero == 1)
outtextxy(x-20, y-20 ,"B");
if (numero == 2)
outtextxy(x-20, y-20 ,"C");
if (numero == 3)
outtextxy(x-20, y-20 ,"D");
if (numero == 4)
outtextxy(x-20, y-20 ,"E");
if (numero == 5)
outtextxy(x-20, y-20 ,"F");
if (numero == 6)
outtextxy(x-20, y-20 ,"G");
if (numero == 7)
outtextxy(x-20, y-20 ,"H");
if (numero == 8)
outtextxy(x-20, y-20 ,"I");
if (numero == 9)
outtextxy(x-20, y-20 ,"J");
if (numero == 10)
outtextxy(x-20, y-20 ,"K");
if (numero == 11)
outtextxy(x-20, y-20 ,"L");
if (numero == 12)
outtextxy(x-20, y-20 ,"M");
if (numero == 13)
outtextxy(x-20, y-20 ,"N");
if (numero == 14)
outtextxy(x-20, y-20 ,"O");
if (numero == 15)
outtextxy(x-20, y-20 ,"P");
if (numero == 16)
outtextxy(x-20, y-20 ,"Q");
if (numero == 17)
outtextxy(x-20, y-20 ,"R");
if (numero == 18)
outtextxy(x-20, y-20 ,"S");
if (numero == 19)
outtextxy(x-20, y-20 ,"T");
if (numero == 19)
outtextxy(x-20, y-20 ,"U");
if (numero == 20)
outtextxy(x-20, y-20 ,"V");
if (numero == 21)
outtextxy(x-20, y-20 ,"W");
if (numero == 22)
outtextxy(x-20, y-20 ,"X");
if (numero == 23)
outtextxy(x-20, y-20 ,"Y");
if (numero == 24)
outtextxy(x-20, y-20 ,"Z");
}
void cuadro()
{
int i,x,y;
initwindow(700,600);
cleardevice(); //funcion del modo grafico que borra todo en pantalla.
for (i=0;i<=425;i+=25) //Un bucle del 0 al 400 con intervalo 25 para dijujar las lineas en paralelo
{
line(i,0,i,425);//funcion dibuja linea rectas en coordenadas ( x1 , y1 , x2 , y2 )
line(0,i,425,i);
delay(50);//funcion que retrasa en unos milesegundo en aparecer cada linea.
rectangle(425,0,625,425);//Crea un rectangulo en coordenadas ( x1 ,y1 , x2 , y2 )
rectangle(0,425,625,460);
settextstyle(0,0,2);// Funcion ajusta el tipo de letra, la direccion y el tamaño ( fuente, {horz{0}, vert{1}} , tamaño )
setbkcolor(0);
settextstyle(3,0,1);
outtextxy(435,5,"Hola Jugador");
outtextxy(435,25,"Bienvenido Al Juego");
outtextxy(5,435,"> Nivel. 1");
setbkcolor(BLACK);
settextstyle(0,0,2);
srand(time(NULL));
for (x=25;x<=425;x+=25)
for (y=25;y<=425;y+=25)
letras(x,y);
}
}
int main()
{
cleardevice();
cuadro();
getchar();
}