diff options
-rw-r--r-- | src/game.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -69,13 +69,13 @@ input(struct game *g) } else if (c == KEY_LEFT) { pad = &g->players[0]->paddle_h; dir = -1; - if (pad->pos > pad->size / 2 + 2) { + if (pad->pos > pad->size / 2 + 3) { pad->pos += pad->speed * dir; } } else if (c == KEY_RIGHT) { pad = &g->players[0]->paddle_h; dir = 1; - if (pad->pos < 78 - pad->size / 2) { + if (pad->pos < 77 - pad->size / 2) { pad->pos += pad->speed * dir; } } else if (c == KEY_UP) { @@ -120,13 +120,13 @@ draw_paddles(struct game *g) /* Player 1 vertical paddle */ for (pos = 0; pos < 24; ++pos) { - mvprintw(pos, 1, " "); + mvprintw(pos, 2, " "); } off = g->players[0]->paddle_v.pos; off -= g->players[0]->paddle_v.size / 2; for (pos = 0; pos < g->players[0]->paddle_v.size; ++pos) { attr_on(WA_REVERSE, NULL); - mvprintw(off + pos, 1, " "); + mvprintw(off + pos, 2, " "); attr_off(WA_REVERSE, NULL); } @@ -144,13 +144,13 @@ draw_paddles(struct game *g) /* Player 2 vertical paddle */ for (pos = 0; pos < 24; ++pos) { - mvprintw(pos, 78, " "); + mvprintw(pos, 77, " "); } off = g->players[1]->paddle_v.pos; off -= g->players[1]->paddle_v.size / 2; for (pos = 0; pos < g->players[1]->paddle_v.size; ++pos) { attr_on(WA_REVERSE, NULL); - mvprintw(off + pos, 78, " "); + mvprintw(off + pos, 77, " "); attr_off(WA_REVERSE, NULL); } } |