Tic-tac-toe: Difference between revisions

→‎J: Attempt to correct bad templating
(→‎J: Made code shorter, added brief exposition about design)
Tags: Mobile edit Mobile web edit
(→‎J: Attempt to correct bad templating)
Tags: Mobile edit Mobile web edit
Line 6,702:
Encoding data with numbers this way allows the convenience of e.g. being able to simply check whether the absolute value of the sum across a given line is 3, indicating a win.
 
Note that <codenowiki>U=:{{u^:(-.@:v)^:_}}</codenowiki> would've quit upon receiving invalid input, as this would leave the argument unchanged.
<pre>
]M=: ?3 3$3
13

edits