diff options
author | Paul Janzen <pjanzen@cvs.openbsd.org> | 1999-04-20 23:01:14 +0000 |
---|---|---|
committer | Paul Janzen <pjanzen@cvs.openbsd.org> | 1999-04-20 23:01:14 +0000 |
commit | b4cd185f95b2a5178319043c512cae1285cfbba5 (patch) | |
tree | b6cbfcade82a1e6672c48e84dd72c0478a8f6c95 /games/snake | |
parent | 67b342787d34e5210f4e35291e075d0c3ec5d9ee (diff) |
jsm28@cam.ac.uk: place cursor on player, not one over.
Diffstat (limited to 'games/snake')
-rw-r--r-- | games/snake/snake.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/games/snake/snake.c b/games/snake/snake.c index 767f3c51d5f..43a803a7a0c 100644 --- a/games/snake/snake.c +++ b/games/snake/snake.c @@ -1,4 +1,4 @@ -/* $OpenBSD: snake.c,v 1.1 1999/03/13 02:08:10 pjanzen Exp $ */ +/* $OpenBSD: snake.c,v 1.2 1999/04/20 23:01:12 pjanzen Exp $ */ /* $NetBSD: snake.c,v 1.8 1995/04/29 00:06:41 mycroft Exp $ */ /* @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)snake.c 8.2 (Berkeley) 1/7/94"; #else -static char rcsid[] = "$OpenBSD: snake.c,v 1.1 1999/03/13 02:08:10 pjanzen Exp $"; +static char rcsid[] = "$OpenBSD: snake.c,v 1.2 1999/04/20 23:01:12 pjanzen Exp $"; #endif #endif /* not lint */ @@ -196,6 +196,7 @@ main(argc, argv) setup(); mainloop(); /* NOT REACHED */ + return(0); } /* Main command loop */ @@ -204,9 +205,12 @@ mainloop() { int j, k; int c, match, lastc = 0; + struct point tmp; for (;;) { - move(&you); + tmp.col = you.col + 1; + tmp.line = you.line + 1; /* Highlight you, not left & above */ + move(&tmp); fflush(stdout); if (((c = getchar() & 0177) <= '9') && (c >= '0')) { ungetc(c, stdin); |