diff options
author | Ted Unangst <tedu@cvs.openbsd.org> | 2017-05-28 21:01:14 +0000 |
---|---|---|
committer | Ted Unangst <tedu@cvs.openbsd.org> | 2017-05-28 21:01:14 +0000 |
commit | 7475bcb195f3f84df1cbeb2308ad44b00e0fa7d2 (patch) | |
tree | 7f9472c046a4702c796725d022712b6a43f48e2c /games | |
parent | 5f8f53740dfab868e2f7cb2c31de95a90bda2c32 (diff) |
if your dying scream would escape the death field, realign to stay within
Diffstat (limited to 'games')
-rw-r--r-- | games/robots/main.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/games/robots/main.c b/games/robots/main.c index dd082a90624..8095529ad6e 100644 --- a/games/robots/main.c +++ b/games/robots/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.25 2016/03/07 12:07:57 mestre Exp $ */ +/* $OpenBSD: main.c,v 1.26 2017/05/28 21:01:13 tedu Exp $ */ /* $NetBSD: main.c,v 1.5 1995/04/22 10:08:54 cgd Exp $ */ /* @@ -159,7 +159,10 @@ main(int ac, char *av[]) make_level(); play_level(); } - move(My_pos.y, My_pos.x); + if (My_pos.x > X_FIELDSIZE - 16) + move(My_pos.y, X_FIELDSIZE - 16); + else + move(My_pos.y, My_pos.x); printw("AARRrrgghhhh...."); refresh(); score(score_wfd); |