tic tac toe by jbb(cheat)

a=@a&$><<gsub(/-/){a||$`+"X"+$'!~/(XX|(X..X|..X.|.{5}X..)..)X/m?"-":a="X"}while gets$/*2

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return top