diff options
author | 2025-05-21 23:48:24 +0200 | |
---|---|---|
committer | 2025-05-21 23:48:24 +0200 | |
commit | 8d3d0a98d71181d5f65b4f08d40976a9824ba68a (patch) | |
tree | 873ba3b2f23225e4b0e456d10ee66d8eafd03271 /src/main/game/game.c | |
parent | 8ab83a9a30b3e04cc270f3c7322b105374905a75 (diff) | |
download | tris-8d3d0a98d71181d5f65b4f08d40976a9824ba68a.tar.gz tris-8d3d0a98d71181d5f65b4f08d40976a9824ba68a.zip |
Add the logic for the Cell if filled
When the user click on a box, a sign appears and that cell will be
set as filled.
Diffstat (limited to 'src/main/game/game.c')
-rw-r--r-- | src/main/game/game.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/game/game.c b/src/main/game/game.c index 25de722..2e2db8f 100644 --- a/src/main/game/game.c +++ b/src/main/game/game.c @@ -77,7 +77,8 @@ loop_cells(list_t *cells, float x, float y) list_node_t *current = cells->head; do { Cell *cell = current->data; - if (cell_within_bounds(cell, x, y)) { + if (!cell_is_filled(cell) && cell_within_bounds(cell, x, y)) { + cell_set_filled(cell, true); } current = current->next; } while (current != NULL); |