Welcome to SWI-Prolog (Version 3.3.0) Copyright (c) 1993-1999 University of Amsterdam. All rights reserved. For help, use ?- help(Topic). or ?- apropos(Word). ?- consult('C:\\_Prolog\\dragon.pl'). % C:\_Prolog\dragon.pl compiled 0.00 sec, 14,560 bytes Yes ?- start. Enter commands using standard Prolog syntax. Available commands are: start. -- to start the game. n. s. e. w. u. d. -- to go in that direction. take(Object). -- to pick up an object. drop(Object). -- to put down an object. use(Object). -- to use an object. attack. -- to attack an enemy. look. -- to look around you again. instructions. -- to see this message again. halt. -- to end the game and quit. You are in a meadow. To the north is the dark mouth of a cave; to the south is a small building. Your assignment, should you decide to accept it, is to recover the famed Bar-Abzad ruby and return it to this meadow. Yes ?- s. You are in a small building. The exit is to the north. The room is devoid of furniture, and the only feature seems to be a small door to the east. There is a flashlight here. Yes ?- take(flashlight). OK. Yes ?- e. The door appears to be locked. You can't go that way. Yes ?- n. You are in a meadow. To the north is the dark mouth of a cave; to the south is a small building. Your assignment, should you decide to accept it, is to recover the famed Bar-Abzad ruby and return it to this meadow. Yes ?- n. You are in the mouth of a dank cave. The exit is to the south; there is a large, dark, round passage to the east. There is a key here. Yes ?- take(key). OK. Yes ?- s. You are in a meadow. To the north is the dark mouth of a cave; to the south is a small building. Your assignment, should you decide to accept it, is to recover the famed Bar-Abzad ruby and return it to this meadow. Yes ?- s. You are in a small building. The exit is to the north. The room is devoid of furniture, and the only feature seems to be a small door to the east. Yes ?- e. The door appears to be locked. You can't go that way. Yes ?- use(key). The closet is no longer locked. Yes ?- e. This is nothing but an old storage closet. There is a sword here. Yes ?- take(sword). OK. Yes ?- w. You are in a small building. The exit is to the north. The room is devoid of furniture, and the only feature seems to be a small door to the east. Yes ?- n. You are in a meadow. To the north is the dark mouth of a cave; to the south is a small building. Your assignment, should you decide to accept it, is to recover the famed Bar-Abzad ruby and return it to this meadow. Yes ?- n. You are in the mouth of a dank cave. The exit is to the south; there is a large, dark, round passage to the east. Yes ?- e. You're in the cave, and...Shhh! There's a dragon here! It's curled up around a chest of some sort...I don't think it's noticed you...yet. Yes ?- attack. Screaming madly and flailing the sword in the air, you rush headlong at the dragon. The dragon, startled out of a sound sleep, flies out of the cave. He'll probably be back soon... Yes ?- look. You are in a big, dark cave. The air is fetid. There is a chest here. Yes ?- take(chest). With a mighty heave, you fail to lift it. Yes ?- use(key). Opening the chest reveals a giant ruby! Yes ?- take(ruby). OK. Yes ?- w. You are in the mouth of a dank cave. The exit is to the south; there is a large, dark, round passage to the east. Yes ?- s. Congratulations!! You have recovered the ruby and won the game. The game is over. Please enter the "halt." command.