|
|
| Perl Monk, Perl Meditation | |
| PerlMonks |
Re: (Golf) Tic Tac Toeby ambrus (Abbot) |
| on Jun 06, 2004 at 22:08 UTC ( #361818=note: print w/ replies, xml ) | Need Help?? |
|
Just an idea. This may or may not help in the golf, but is good to know anyway. If you take this magic square: and play tic-tac-toe on it, you have three in a row iff you have three different cells so that the sum of their three numbers is 15. Source of the idea: Csákány Béla, Diszkrét matematikai játékok.
Update: changed 1 in 1st row to 2. Thanks to jdhawke and also QM for noticing the typo. Update: this one does not check for valid moves so it's easy to cheat. Also, it does not detect ties yet.
In Section
Obfuscated Code
|
|
||||||||||||||||||||||||||