mirror of
https://codeberg.org/hkzlab/TK2048.git
synced 2026-01-01 17:09:20 +11:00
Fix logic
This commit is contained in:
parent
dd61eae8d1
commit
38a40eb2e4
4 changed files with 37 additions and 13 deletions
11
src/main.c
11
src/main.c
|
|
@ -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);
|
||||
}
|
||||
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue