Fix logic

This commit is contained in:
hkz 2025-07-18 09:12:17 +02:00
commit 38a40eb2e4
4 changed files with 37 additions and 13 deletions

View file

@ -64,10 +64,15 @@ __task int main(void) {
// If we have finished, break out of this loop
if(state.done) break;
// Unable to add a tile. We lost!!!
if(!add_random_tile()) break;
// Draw the moved sprites
draw_tiles();
// Unable to add a tile. We lost!!!
uint8_t random_tile_off = add_random_tile();
if(!random_tile_off) break;
// Draw the new tile directly on the front buffer
ddraw_single_tile(random_tile_off - 1);
}
};