Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions examples/wumpus.p4
Original file line number Diff line number Diff line change
Expand Up @@ -286,15 +286,15 @@ CREATE shoot-path 5 CELLS ALLOT
;

: shoot-distance ( -- dist )
BEGIN
0 BEGIN ( dist-wrong ) DROP
." NO. OF ROOMS(1-5) " PAD /PAD ACCEPT \ S: len
DROP 0 S>D PAD /PAD >NUMBER 2DROP D>S \ S: dist
DUP 1 6 WITHIN \ S: dist bool
UNTIL \ S: dist
;

: shoot-room ( -- room )
BEGIN
0 BEGIN ( room-wrong ) DROP
." ROOM# " PAD /PAD ACCEPT \ S: len
DROP 0 S>D PAD /PAD >NUMBER 2DROP D>S \ S: room
DUP 1 max_rooms WITHIN \ S: room bool
Expand Down