diff options
author | P. J. McDermott <pjm@nac.net> | 2013-05-20 16:55:07 (EDT) |
---|---|---|
committer | P. J. McDermott <pjm@nac.net> | 2013-05-20 16:55:07 (EDT) |
commit | 08324bf49ea539c52d663648048fb0cdacc7c7a9 (patch) | |
tree | af7c79fdaa3d6aed132fb522358f6c5e098a6764 | |
parent | 522f5dae6842a241149e4e466ff830a29d1cf73d (diff) | |
download | cursespong-08324bf49ea539c52d663648048fb0cdacc7c7a9.zip cursespong-08324bf49ea539c52d663648048fb0cdacc7c7a9.tar.gz cursespong-08324bf49ea539c52d663648048fb0cdacc7c7a9.tar.bz2 |
Add extra padding to vertical board edges.
-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); } } |