mirror of
https://codeberg.org/hkzlab/TK2048.git
synced 2025-12-26 05:32:16 +11:00
Add losing condition
This commit is contained in:
parent
ccf46b9afb
commit
842745d3dd
1 changed files with 2 additions and 1 deletions
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue