From: tedu Date: Sun, 28 May 2017 21:01:13 +0000 (+0000) Subject: if your dying scream would escape the death field, realign to stay within X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=ebff5be786b95638afbe4968de3a4a2a58c81751;p=openbsd if your dying scream would escape the death field, realign to stay within --- 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);