Saturday, 17 August 2013

Checking for other rules

Checking for other rules

I have this "forward" rule that can move the player to different room and
it is functioning properly...
forward:-here(Location), facing(Direction), connected(Location,
PlaceToMove, Direction), moveto(PlaceToMove).
forward:-write('Sorry you cant move forward.').
But now , I have to put some rules that can detect if the player can feel
the breeze if he is around "m" and can fell into the pit if he reaches
"m".
breeze(m,xong).
checkbreeze:- here(Location), breeze(P,xong), connected(Location,P,_),
write('You felt the breeze.').
checkpit:- here(m), write('You fell into the pit.').
But my question is , how can I put it in the "forward" rule??

No comments:

Post a Comment