#include #include #include /*#include "time.h"*/ #define HAUTEUR 20 #define LARGEUR 30 #define TAILLE_CASE 20 #define ESPACE_NOIR 100 int direction = 4; int t; void AfficherQuadrillage(){ int j; int i; InitialiserGraphique(); CreerFenetre(10, 10, 30 * TAILLE_CASE, 20 * TAILLE_CASE + ESPACE_NOIR); for (i = 0; i < LARGEUR; i++) { for (j = 0; j < HAUTEUR; j++) { if ((i + j) % 2 == 0) { ChoisirCouleurDessin(CouleurParComposante(144, 238, 144)); } else { ChoisirCouleurDessin(CouleurParComposante(0, 128, 0)); } RemplirRectangle(i * TAILLE_CASE, j * TAILLE_CASE, TAILLE_CASE, TAILLE_CASE); } } ChoisirCouleurDessin(CouleurParComposante(0, 0, 0)); RemplirRectangle(0, HAUTEUR * TAILLE_CASE, LARGEUR * TAILLE_CASE, ESPACE_NOIR); ChoisirCouleurDessin(CouleurParComposante(0, 0, 0)); RemplirRectangle(0, 0, LARGEUR * TAILLE_CASE, TAILLE_CASE); RemplirRectangle(0, 0, TAILLE_CASE, HAUTEUR * TAILLE_CASE); RemplirRectangle(0, (HAUTEUR - 1) * TAILLE_CASE, LARGEUR * TAILLE_CASE, TAILLE_CASE); RemplirRectangle((LARGEUR - 1) * TAILLE_CASE, 0, TAILLE_CASE, HAUTEUR * TAILLE_CASE); }