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
|
#include <stdio.h>
#include <windows.h>
#include <conio2.h>
void f (char const coord[], char tab[][6], int *pl, int jeton,
int coordlettre)
{
if (coord[2] == '1')
{
int i;
tab[*pl][0] = jeton;
for (i = 0; i < (*pl - coordlettre) * 2; i = i + 2)
{
gotoxy (13, 14 + i + coordlettre * 2);
printf ("%c", jeton);
Sleep (200);
gotoxy (13, 14 + i + coordlettre * 2);
printf (" ");
}
(*pl)--;
}
}
int main (void)
{
char tab[6][6] = { {0} };
char coord[4] = { 0 };
int coordlettre = 0;
int l[6] = { 0 };
int jeton = 0;
int i;
for (i = 0; i < 5; i++)
{
f (coord, tab, l + i, jeton, coordlettre);
}
return 0;
} |
Partager