From 8fe62b8b4764235b18ae3a7ac42e9387c8b84d96 Mon Sep 17 00:00:00 2001 From: Lyanis Souidi Date: Sat, 3 Dec 2022 23:25:38 +0100 Subject: [PATCH] Ajout du retournement des cartes lors du clic --- src/game.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/game.c b/src/game.c index a46caf8..50589b2 100644 --- a/src/game.c +++ b/src/game.c @@ -85,6 +85,17 @@ int game(int colonnes, int lignes) { boucle = 1; while (boucle) { update_timer(timer); + + SourisPosition(); + if (SourisCliquee()) { + for (l = 0; l < lignes; l++) { + for (c = 0; c < colonnes; c++) { + if (check_zone(cards[l][c].zone, _X, _Y)) { + cards[l][c] = show_card(cards[l][c]); + } + } + } + } } return fin(timer);