From 8a5d8c4d909b24ccefd9e31a3ed112722aaed7d6 Mon Sep 17 00:00:00 2001 From: Andrew Opalach Date: Mon, 4 Mar 2019 21:13:33 -0500 Subject: add lock delay --- frontend/ncurses/ncurses_ui.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'frontend/ncurses') diff --git a/frontend/ncurses/ncurses_ui.c b/frontend/ncurses/ncurses_ui.c index 8eef158..9fdc83b 100644 --- a/frontend/ncurses/ncurses_ui.c +++ b/frontend/ncurses/ncurses_ui.c @@ -81,15 +81,15 @@ void curses_init() { void draw_board(struct cetris_game* g) { mvaddstr(0, 0, PLAY_FIELD_STR); for (int x = 0; x < BOARD_X; x++) { - for (int y = 0; y < BOARD_Y; y++) { + for (int y = BOARD_VISABLE; y < BOARD_Y; y++) { if (g->board[x][y].occupied) { attron(COLOR_PAIR(g->board[x][y].c)); if (g->board[x][y].remove_tick > 0) { if (g->tick % 2 == 0) { - mvaddstr(y + 1, x * 2 + X_OFFSET, BLOCK); + mvaddstr((y - BOARD_VISABLE) + 1, x * 2 + X_OFFSET, BLOCK); } } else { - mvaddstr(y + 1, x * 2 + X_OFFSET, BLOCK); + mvaddstr((y - BOARD_VISABLE) + 1, x * 2 + X_OFFSET, BLOCK); } attroff(COLOR_PAIR(g->board[x][y].c)); } -- cgit v1.2.3-101-g0448