WWW::TwentyQuestionsPerl interface to the classic 20 Questions game as provided by 20Q.net | |
Download |
WWW::TwentyQuestions Ranking & Summary
Advertisement
- License:
- Perl Artistic License
- Price:
- FREE
- Publisher Name:
- Casey Kirsle
- Publisher web site:
- http://search.cpan.org/~kirsle/Tk-HyperText-0.06/lib/Tk/HyperText.pm
WWW::TwentyQuestions Tags
WWW::TwentyQuestions Description
Perl interface to the classic 20 Questions game as provided by 20Q.net WWW::TwentyQuestions is a Perl interface to the classic 20 Questions game as provided by 20Q.netSYNOPSIS use WWW::TwentyQuestions; # Create a new object my $q = new WWW::TwentyQuestions; # Start a new game and get the first question # ("Is it an animal, vegetable, or mineral?") my $first = $q->start; # Print the first question and our options. print "$first " . $q->choices . " "; # Loop while we're playing. while ($q->playing) { # Give the user a chance to answer. my $answer = < STDIN >; chomp $answer; # Send the answer into the game and get the next question # (or the same question if the answer was unacceptable) my $next = $q->answer ($answer); # Print the next question and our choices. print "$next " . $q->choices . " "; } print "Game Over ";This module serves as an interface to the Classic 20 Questions game as provided on 20Q.net. Currently the module only supports the English version of the Classic game; the "20Q Music" and "20Q People" and other like games are *not* yet supported. Requirements: · Perl
WWW::TwentyQuestions Related Software