Morpion solitaire: Difference between revisions
Content added Content deleted
m (→{{header|J}}) |
|||
Line 386: | Line 386: | ||
play =: 3 : 0 |
play =: 3 : 0 |
||
OUTPUT =: y |
OUTPUT =: y |
||
⚫ | |||
RANDOM_STATE =: '(9!:42 ; 9!:44 ; 9!:0)' ; (9!:42 ; 9!:44 ; 9!:0)'' |
RANDOM_STATE =: '(9!:42 ; 9!:44 ; 9!:0)' ; (9!:42 ; 9!:44 ; 9!:0)'' |
||
if. 0 < # OUTPUT do. |
if. 0 < # OUTPUT do. |
||
Line 391: | Line 392: | ||
smoutput 'RANDOM_STATE begins as' ; RANDOM_STATE |
smoutput 'RANDOM_STATE begins as' ; RANDOM_STATE |
||
end. |
end. |
||
⚫ | |||
TURN =: _1 NB. count the number of plays. Convergence requires 1 extra attempt. |
TURN =: _1 NB. count the number of plays. Convergence requires 1 extra attempt. |
||
GRID =: morpion GREEK_CROSS NB. play the game |
GRID =: morpion GREEK_CROSS NB. play the game |