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);
|
||||
|
||||
box(stdscr, 0, 0);
|
||||
mvprintw(getmaxy(stdscr) - 2, 1,
|
||||
"score: %d | <%c> up | <%c> down | <%c> right | <%c> left | <%c> quit",
|
||||
score, up_key,
|
||||
down_key, right_key,
|
||||
left_key, quit_key);
|
||||
|
||||
mvprintw(getmaxy(stdscr) - 2, 1, "score: %d", score);
|
||||
if (score < 4)
|
||||
mvprintw(getmaxy(stdscr) - 2, 9,
|
||||
" | <%c> up | <%c> down | <%c> right | <%c> left | <%c> quit",
|
||||
up_key, down_key, right_key, left_key, quit_key);
|
||||
|
||||
snake_print(s);
|
||||
field_print(f);
|
||||
|
||||
|
|
Loading…
Reference in a new issue