AI-Prolog

 view release on metacpan or  search on metacpan

data/sleepy.pro  view on Meta::CPAN

sleep :-
    print('Ahhh...you (yawn) made...it...zzzzzzzz.'), nl, nl,
    finish.

swat(fly) :-
    swat.

swat :-
    i_am_at(Place),
    not(lit(Place)),
    print('You flail aimlessly in the dark!'), nl.

swat :-
    not(i_am_holding(flyswatter)),
    print('You are not holding the flyswatter.'), nl,
    !, fail.

swat :-
    not(alive(fly)),
    print('He is dead, Jim.'), nl.



( run in 0.830 second using v1.01-cache-2.11-cpan-acf6aa7dc9e )