Created
September 10, 2011 03:20
-
-
Save mark-d-holmberg/1207883 to your computer and use it in GitHub Desktop.
Asserting in Prolog
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Mark Holmberg, Dixie State College of Utah | |
CS 3520, Programming Languages | |
9 Sept. 2011 | |
Some help with the adventure game | |
% Lets assert some things | |
assert(bag(key)), assert(bag(candle)), assert(bag(sword)), assert(bag(bow)). | |
% do we have a candle? | |
bag(candle). | |
% has the candle left our bag? | |
\+ bag(candle). | |
% do we have booze? | |
bag(beer). | |
% Best of luck! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment