summaryrefslogtreecommitdiffstats
path: root/games/wump
diff options
context:
space:
mode:
authorbillf <billf@FreeBSD.org>1999-09-07 06:00:03 +0000
committerbillf <billf@FreeBSD.org>1999-09-07 06:00:03 +0000
commit3e1d9f25c8a992fb915d18ffaccb3a266e8ad0a4 (patch)
treea392a79dd376bd7e8273e85fac9e7af604437b66 /games/wump
parent33adb981d4021526b69c31fe25c2fc524378289f (diff)
downloadFreeBSD-src-3e1d9f25c8a992fb915d18ffaccb3a266e8ad0a4.zip
FreeBSD-src-3e1d9f25c8a992fb915d18ffaccb3a266e8ad0a4.tar.gz
Avoid ambigious if() if() else().
Diffstat (limited to 'games/wump')
-rw-r--r--games/wump/wump.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/games/wump/wump.c b/games/wump/wump.c
index 7418591..ecab0c9 100644
--- a/games/wump/wump.c
+++ b/games/wump/wump.c
@@ -347,7 +347,7 @@ move_to(room_number)
wump_kill();
return(1);
}
- if (cave[next_room].has_a_pit)
+ if (cave[next_room].has_a_pit) {
if (random() % 12 < 2) {
pit_survive();
return(0);
@@ -355,6 +355,7 @@ move_to(room_number)
pit_kill();
return(1);
}
+ }
if (cave[next_room].has_a_bat) {
(void)printf(
@@ -389,14 +390,15 @@ shoot(room_list)
*/
arrow_location = player_loc;
for (roomcnt = 1;; ++roomcnt, room_list = NULL) {
- if (!(p = strtok(room_list, " \t\n")))
+ if (!(p = strtok(room_list, " \t\n"))) {
if (roomcnt == 1) {
(void)printf(
"The arrow falls to the ground at your feet!\n");
return(0);
} else
break;
- if (roomcnt > 5) {
+ }
+ if (roomcnt > 5) {
(void)printf(
"The arrow wavers in its flight and and can go no further!\n");
break;
OpenPOWER on IntegriCloud