Pseudo Code Library |
The Old Empty BarnExplanationOn the edge of the village, partly hidden by the trees of Dark Wood, stands the Old Empty Barn. Local folk law has it that a person could make their fortune just by stepping into it, but at the risk of paying a terrible price. Carved into the walls of the village church is this ancient inscription. If thou should approach the Old Empty Barn, perchance a voice will call out to thee. "Stranger!" It sayeth. "Wilst thou enter this empty barn in pursuit of fame and fortune? Enter thee and partake of the riches within. Enter!" Go not inside! Lest a terrible fate befall thee! According to what you can glean from talking to the locals, if you should enter the Old Empty Barn, one of three things will happen. There is a 4 in 6 chance that when you enter you will find that.
Disappointed, you will simply leave. There is a 1 in 6 chance that when you enter the barn, you will find it heaped with treasure of every kind. The barn will start to tremble as the ground beneath heaves and shakes. Fearing it's collapse, you will gather as much treasure as you can carry and flee for your life. There is a 1 in 6 chance that when you enter the barn, you will find that you are not alone. Inside are the desperate trapped souls of previous unfortunates to come through the door. They reach out and call to you, begging for you to release them, but you cannot. YOU ARE TRAPPED THERE TOO! InstructionsYou have been hired to create a computer program based on the Old Empty Barn legend. Here are the client's requirements
Tips and adviceAny ASCII art you use should be stored in a .TXT file and displayed by reading the file and printing it's contents. If you put your ASCII art in a variable, some of the characters in it might cause problems. The list of treasure is best also kept in a file. You can read it into an array (with the 'readlines()' command) and then display it on the screen. To make it move up quickly, just print loads of blank lines. You can control the speed with a time.sleep() between them. Store the lost souls in a file, and append the current user to it. |