-
Notifications
You must be signed in to change notification settings - Fork 1
/
tablero.h
76 lines (72 loc) · 1.28 KB
/
tablero.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
void gra(void){
/* request auto detection */
int gdriver = DETECT, gmode, errorcode;
/* initialize graphics and local variables */
initgraph(&gdriver, &gmode, "");
/* read result of initialization */
errorcode = graphresult();
/* an error occurred */
if (errorcode != grOk)
{
printf("Graphics error: %s\n", grapherrormsg(errorcode));
printf("Press any key to halt:");
getch();
exit(1);
}
}
//*******************************************************************
void tablero(void){
int aux=0;
int x,y;
x=156;
y=20;
/*lineas horizontales*/
while(aux!=9){
line(x,y,x+328,y);
y=y+41;
aux++;
}
/*lineas verticales*/
aux=0;
x=156;
y=20;
while(aux!=9){
line(x,y,x,y+328);
x=x+41;
aux++;
}
/*numeros laterales*/
gotoxy(19,3);
printf("1");
gotoxy(19,5);
printf("2");
gotoxy(19,8);
printf("3");
gotoxy(19,10);
printf("4");
gotoxy(19,13);
printf("5");
gotoxy(19,16);
printf("6");
gotoxy(19,18);
printf("7");
gotoxy(19,21);
printf("8");
/*numeros superiores*/
gotoxy(24,1);
printf("1");
gotoxy(29,1);
printf("2");
gotoxy(34,1);
printf("3");
gotoxy(39,1);
printf("4");
gotoxy(44,1);
printf("5");
gotoxy(49,1);
printf("6");
gotoxy(54,1);
printf("7");
gotoxy(59,1);
printf("8");
}