made controls info disappear after score >= 4
This commit is contained in:
parent
6b7ca2683e
commit
dbdb2ee926
1 changed files with 7 additions and 5 deletions
12
src/main.c
12
src/main.c
|
@ -99,11 +99,13 @@ int main(void) {
|
||||||
score += snake_eat(s, f);
|
score += snake_eat(s, f);
|
||||||
|
|
||||||
box(stdscr, 0, 0);
|
box(stdscr, 0, 0);
|
||||||
mvprintw(getmaxy(stdscr) - 2, 1,
|
|
||||||
"score: %d | <%c> up | <%c> down | <%c> right | <%c> left | <%c> quit",
|
mvprintw(getmaxy(stdscr) - 2, 1, "score: %d", score);
|
||||||
score, up_key,
|
if (score < 4)
|
||||||
down_key, right_key,
|
mvprintw(getmaxy(stdscr) - 2, 9,
|
||||||
left_key, quit_key);
|
" | <%c> up | <%c> down | <%c> right | <%c> left | <%c> quit",
|
||||||
|
up_key, down_key, right_key, left_key, quit_key);
|
||||||
|
|
||||||
snake_print(s);
|
snake_print(s);
|
||||||
field_print(f);
|
field_print(f);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue