Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

Re^3: (Golf) Tic Tac Toe

by thospel (Hermit)
on Jun 07, 2004 at 16:24 UTC ( #362035=note: print w/ replies, xml ) Need Help??

in reply to Re^2: (Golf) Tic Tac Toe
in thread (Golf) Tic Tac Toe

Forgot to do the final situation print in that 124, but now it prints the person whose turn is WAS.

s//123 456 789 z147,258,369,159,357/;$p=O;{/z/;print$`.$p;/$p{3}/?die$p:/\d/?$p^=O^X: +die Tie;1until<>=~/\d/&&s/$&/$p/g;redo}

Comment on Re^3: (Golf) Tic Tac Toe
Download Code
Replies are listed 'Best First'.
Re^4: (Golf) Tic Tac Toe
by thospel (Hermit) on Jun 07, 2004 at 17:11 UTC
    Printing flaw fixed, and to 119:
    s//123 456 789 z147,258,369,159,357/;$p=O;{/z/;print$`,$p^=O^X;/(.)\1\1/?die$1:/\d/|| +die Tie;$?=<>until s/$?/$p/g;redo}
    by Jasper (Chaplain) on Jun 17, 2004 at 16:22 UTC
      CORRECTION: I am stupid, after all.

      The OPs method of checking the verticals and diagonals was pretty clever.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (3)
As of 2015-10-04 12:54 GMT
Find Nodes?
    Voting Booth?

    Does Humor Belong in Programming?

    Results (102 votes), past polls