Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- IDENTIFICATION DIVISION.
- PROGRAM-ID. HELLO-WORLD.
- DATA DIVISION.
- WORKING-STORAGE SECTION.
- 01 UNOS PIC X(100).
- 77 HASKEY PIC 9 VALUE ZERO.
- PROCEDURE DIVISION.
- HALLWAY.
- DISPLAY "You are in a hallway with four alcoves.".
- DISPLAY "Exits: N S E W .".
- DISPLAY "What should I do?>" WITH NO ADVANCING.
- ACCEPT UNOS FROM CONSOLE.
- EVALUATE UNOS
- WHEN "N"
- PERFORM OFFICE1
- WHEN "S"
- PERFORM OFFICE2
- WHEN "W"
- PERFORM LOBBY
- WHEN "E"
- PERFORM RESTROOM.
- WHEN OTHER
- DISPLAY "I don't understand."
- GO TO HALLWAY.
- END.
- STOP RUN.
- OFFICE1.
- DISPLAY "You are in an office. A terminal screen is turned on. You can see it's night out of the window".
- DISPLAY "You see nothing else of interest".
- DISPLAY "Exits: S.".
- DISPLAY "What should I do?>" WITH NO ADVANCING.
- ACCEPT UNOS FROM CONSOLE.
- EVALUATE UNOS
- WHEN "S"
- GO TO HALLWAY
- WHEN "EXAMINE TERMINAL"
- DISPLAY "You see a notes application open with: 'Dobbs left the key to the main door at the security desk.' written on it."
- GO TO OFFICE2
- WHEN OTHER
- DISPLAY "I don't understand"
- GO TO OFFICE1.
- OFFICE2.
- DISPLAY "You are in the executive office. There is a fax machine on the table and a paper sticking out of it.".
- DISPLAY "You see nothing else of interest.".
- DISPLAY "Exits: N".
- DISPLAY "What should I do?>" WITH NO ADVANCING.
- ACCEPT UNOS FROM CONSOLE.
- EVALUATE UNOS
- WHEN "N"
- GO TO HALLWAY
- WHEN "EXAMINE PAPER"
- DISPLAY "'TO: Jane DeSoto , MSG: Safe code is Djura777'."
- GO TO OFFICE2
- WHEN OTHER
- DISPLAY "I don't understand."
- GO TO OFFICE2.
- RESTROOM.
- DISPLAY "The restroom is spotless clean, except for a grafitti written on the wall 'KILROY WAS HERE.'.".
- DISPLAY "You see nothing else of interest.".
- DISPLAY "Exits: W".
- DISPLAY "What should I do?>" WITH NO ADVANCING.
- ACCEPT UNOS FROM CONSOLE.
- EVALUATE UNOS
- WHEN "W"
- GO TO HALLWAY
- WHEN OTHER
- DISPLAY "I don't understand."
- GO TO RESTROOM.
- LOBBY.
- DISPLAY "You are in the lobby. There is a secuirty desk with a safe to the northern end, and the main door is to the west".
- DISPLAY "You see nothing else of interest.".
- DISPLAY "Exits: N".
- DISPLAY "What should I do?>" WITH NO ADVANCING.
- ACCEPT UNOS FROM CONSOLE.
- EVALUATE UNOS
- WHEN "E"
- GO TO HALLWAY
- WHEN "OPEN SAFE"
- DISPLAY "Enter the code>" WITH NO ADVANCING
- ACCEPT UNOS FROM CONSOLE
- IF UNOS EQUALS "Djura777" THEN
- DISPLAY "You got the key!"
- DISPLAY "You sucessfully exit the building."
- DISPLAY "Game over! You won!"
- GO TO END.
- ELSE
- DISPLAY "Wrong password!"
- GO TO LOBBY.
- WHEN OTHER
- DISPLAY "I don't understand."
- GO TO OFFICE2.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement