diff options
| author | 2019-03-04 21:13:33 -0500 | |
|---|---|---|
| committer | 2019-03-04 21:13:33 -0500 | |
| commit | 8a5d8c4d909b24ccefd9e31a3ed112722aaed7d6 (patch) | |
| tree | c31d4a7d570a8ba8c9d279c6ae70213339f2e711 /frontend/ncurses | |
| parent | c25557f0637046c85f46678ca58a0f9f60d25db7 (diff) | |
| download | cetris-8a5d8c4d909b24ccefd9e31a3ed112722aaed7d6.tar.gz cetris-8a5d8c4d909b24ccefd9e31a3ed112722aaed7d6.tar.bz2 cetris-8a5d8c4d909b24ccefd9e31a3ed112722aaed7d6.zip | |
add lock delay
Diffstat (limited to 'frontend/ncurses')
| -rw-r--r-- | frontend/ncurses/ncurses_ui.c | 6 |
1 files changed, 3 insertions, 3 deletions
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));
}
|