Solve a Hidato puzzle: Difference between revisions
Content added Content deleted
m (→{{header|Tailspin}}: update to stricter typing) |
|||
Line 4,789: | Line 4,789: | ||
when <~{row: <1..$@hidato.board::length>, col: <1..$@hidato.board(1)::length>}> do !VOID |
when <~{row: <1..$@hidato.board::length>, col: <1..$@hidato.board(1)::length>}> do !VOID |
||
when <{ n: <=$@hidato.given(last).n>, row: <=$@hidato.given(last).row>, col: <=$@hidato.given(last).col> }> do $@hidato.board ! |
when <{ n: <=$@hidato.given(last).n>, row: <=$@hidato.given(last).row>, col: <=$@hidato.given(last).col> }> do $@hidato.board ! |
||
when <?($@hidato.board($.row; $.col) <~=0|=$.n>)> do !VOID |
when <?($@hidato.board($.row; $.col) <~=0|=$.n::raw>)> do !VOID |
||
when <?($@hidato.board($.row; $.col) <=0>)?($@hidato.given($.next) <=$.n>)> do !VOID |
when <?($@hidato.board($.row; $.col) <=0>)?($@hidato.given($.next) <=$.n::raw>)> do !VOID |
||
otherwise |
otherwise |
||
def guess: $; |
def guess: $; |