mirror of
https://codeberg.org/hkzlab/TK2048.git
synced 2026-01-31 06:30:53 +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 we have finished, break out of this loop
|
||||||
if(state.done) break;
|
if(state.done) break;
|
||||||
|
|
||||||
add_random_tile();
|
// Unable to add a tile. We lost!!!
|
||||||
|
if(!add_random_tile()) break;
|
||||||
|
|
||||||
draw_tiles();
|
draw_tiles();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue