Skip to content

Commit

Permalink
Stop demo before showing level 1
Browse files Browse the repository at this point in the history
  • Loading branch information
mccreery committed May 7, 2019
1 parent d870d82 commit 53cd576
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/snake/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,12 @@ void tick_board(void) {
draw_score_suffix(SCORE_LEFT, SCORE_Y, score, i);

if((get_score(score) & 15) == 0) {
start_level();
if(demo) {
// Don't let the demo get past level 0
context_switch(setup_mainmenu, tick_mainmenu);
} else {
start_level();
}
return;
}
} else {
Expand Down

0 comments on commit 53cd576

Please sign in to comment.