Skip to content

Instantly share code, notes, and snippets.

@masak

masak/session.md Secret

Last active August 29, 2015 14:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save masak/9cb23eadba7d9dc52210 to your computer and use it in GitHub Desktop.
Save masak/9cb23eadba7d9dc52210 to your computer and use it in GitHub Desktop.
Output from "guess the animal" game

$ perl6 animal.p6
Play 'Guess the animal'
Think of an animal and the computer will try to guess it.

Are you thinking of an animal? yes
Does it swim? no
Is it a bird? no
The animal you were thinking of was a? elephant
Please type a question that would distinguish a elephant from a bird
? Does it like peanuts?
For a elephant the answer would be? yes

Are you thinking of an animal? yes
Does it swim? yes
Is it a fish? no
The animal you were thinking of was a? seal
Please type a question that would distinguish a seal from a fish
? Does it have scales?
For a seal the answer would be? no

Are you thinking of an animal? yes
Does it swim? no
Does it like peanuts? no
Is it a bird? no
The animal you were thinking of was a? lion
Please type a question that would distinguish a lion from a bird
? Does it roar?
For a lion the answer would be? yes

Are you thinking of an animal? yes
Does it swim? yes
Does it have scales? no
Is it a seal? no
The animal you were thinking of was a? octopus
Please type a question that would distinguish a octopus from a seal
? Does it have eight tentacles?
For a octopus the answer would be? yes

Are you thinking of an animal? yes
Does it swim? no
Does it like peanuts? yes
Is it a elephant? yes
Why not try another animal?

Are you thinking of an animal? yes
Does it swim? no
Does it like peanuts? no
Does it roar? no
Is it a bird? no
The animal you were thinking of was a? wumpus
Please type a question that would distinguish a wumpus from a bird
? Is its last name yob?
For a wumpus the answer would be? yes

Are you thinking of an animal? ^D
I now know these animals:
    fish
    octopus
    seal
    elephant
    lion
    wumpus
    bird
$
@Mouq
Copy link

Mouq commented Dec 13, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment