A Monster for Every Season: Summer 2
You can get A Monster for Every Season: Summer 2 now at Gumroad
Results 1 to 2 of 2
  1. - Top - End - #1
    Barbarian in the Playground
     
    BarbarianGuy

    Join Date
    Feb 2010
    Location
    Calgary
    Gender
    Male

    Default prolog question.

    I have to write a simple little text game in prolog. It is coming along okay so far. I am using ...,fail. for each command so it doesn't wait for user to type . or ; with a true rule right after.

    As an Example:
    Code:
    ...
    
    play :- nl,nl,
            write('At any time you can type help to get a list of commands.'),nl,nl,
            write('blah blah blah blah blah blah....'),look.
    play.
    
    
    ....
    this works fine but now after every command prolog returns true. Is there a way in prolog to not echo true after each command?

  2. - Top - End - #2
    Bugbear in the Playground
     
    hajo's Avatar

    Join Date
    Nov 2007
    Location
    DE
    Gender
    Male

    Default Re: prolog question.

    Quote Originally Posted by Balain View Post
    I have to write a simple little text game in prolog. ... Is there a way in prolog to not echo true after each command?
    I have no idea.
    But there is a new release of swi-prolog at portableapps, and they have some tutorials on their homepage...
    Last edited by hajo; 2014-04-23 at 10:10 PM.
    -HaJo

    FLW: Oh, no. We're being rescued. How embarrassing!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •