This is about 190 chars... shebang included. It can be tweaked by reducing the hardcoded 'boo' and 'congrats'. No fancy graphics...#!/usr/bin/perl $w='foobar';@w=split//,$w;for$a(0..7){$z=$a;print"guess\n";$_=<>;chomp +;$l{$_}++;@l=map{$f=$l{$_}?$_:"_"}@w;if(!grep{!$l{$_}}@w){last;}print +@l,$/;}print$z==7?'boo':'congrats'
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: (Golf) Hangman
by japhy (Canon) on Aug 29, 2001 at 00:16 UTC | |
|
Re: (Golf) Hangman
by dragonchild (Archbishop) on Aug 29, 2001 at 00:00 UTC | |
|
Re: (Golf) Hangman
by tachyon (Chancellor) on Aug 29, 2001 at 19:21 UTC |