24-game: update for iota

db4
Slava Pestov 2010-01-15 06:22:20 +13:00
parent 02e920b5ef
commit 2a9cedd593
1 changed files with 1 additions and 1 deletions

View File

@ -56,7 +56,7 @@ DEFER: check-status
[ end-game ]
[ dup quit? [ quit-game ] [ repeat ] if ]
if ;
: build-quad ( -- array ) 4 [ 10 random ] replicate >array ;
: build-quad ( -- array ) 4 [ 10 iota random ] replicate ;
: 24-able? ( quad -- t/f ) [ makes-24? ] with-datastack first ;
: 24-able ( -- vector ) build-quad dup 24-able? [ drop build-quad ] unless ;
: set-commands ( -- ) { + - * / rot swap q } commands set ;