From 842745d3ddec4f6c3f5db2f317c8f0ecceb73abe Mon Sep 17 00:00:00 2001 From: hkz Date: Thu, 17 Jul 2025 14:47:57 +0200 Subject: [PATCH] Add losing condition --- src/main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main.c b/src/main.c index 837ff2d..fea5e48 100644 --- a/src/main.c +++ b/src/main.c @@ -55,7 +55,8 @@ __task int main(void) { // If we have finished, break out of this loop if(state.done) break; - add_random_tile(); + // Unable to add a tile. We lost!!! + if(!add_random_tile()) break; draw_tiles(); }