Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Tic tac toe

by delirium (Chaplain)
on Jun 04, 2004 at 13:57 UTC ( [id://360872]=note: print w/replies, xml ) Need Help??


in reply to Tic tac toe

Can anyone come up with a shorter one?
Only 4 years late, but yes:
@r=(123,456,789,147,258,369,159,357);$,=$/;$p=X; sub d{print@r[0..2],$p;die$_[0]if@_} n:d;$m=<>until grep$m=~/\d/&&s/$&/$p/,@r; d"Tie"if!map/\d/,@r;d$p if map/$p{3}/,@r; $p=~tr/XO/OX/;goto n
190 characters.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://360872]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (5)
As of 2024-04-19 22:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found