fin explication des touches

This commit is contained in:
2023-12-10 20:36:48 +01:00
parent 914a69d439
commit 46dcfa9967
2 changed files with 31 additions and 2 deletions

View File

@@ -11,13 +11,24 @@
int start (void) {
couleur green, grey, yellow, red, black;
couleur green, grey, yellow, red, black, white;
int** tableau = plateau_init();
int i, j;
char* texte1 = "espace = lancer";
char* texte2 = "espace = pause";
char* texte3 = "echap = quitter";
int score=0;
char* num_score = "score : 00000";
InitialiserGraphique();
/*initialisation de la taille de la fenetre de jeux*/
@@ -48,6 +59,24 @@ int start (void) {
RemplirRectangle( 1241, 17, 3, 806);
RemplirRectangle( 1241, 820, 195, 3);
RemplirRectangle( 1433, 17, 3, 806);
/*affichage fonction des touches*/
white = CouleurParComposante(255,255,255);
ChoisirCouleurDessin(white);
EcrireTexte(1250, 300, texte1, 1);
EcrireTexte(1250, 345, texte2, 1);
EcrireTexte(1250, 390, texte3, 1);
/*affichage compteur pomme (score)*/
EcrireTexte(1250, 600, num_score, 2);
@@ -68,8 +97,8 @@ int start (void) {
green = CouleurParComposante(50,205,50);
ChoisirCouleurDessin(green);
RemplirRectangle(20*(j+1),20*(i+1),20,20);
}
if ( tableau[i][j] == 1 || tableau[i][j] == -1 || tableau[i][j] == -2) {
yellow = CouleurParComposante(255,255,0);

Binary file not shown.