game-of-life: faster com-random.

windows-high-dpi
John Benediktsson 2018-03-09 15:53:29 -08:00
parent 0c9086b385
commit 25fc79a40c
1 changed files with 4 additions and 2 deletions

View File

@ -170,8 +170,10 @@ SYMBOL: last-click
gadget relayout-1 ;
:: com-random ( gadget -- )
gadget grid>> [ [ drop { t f } random ] map! drop ] each
gadget relayout-1 ;
gadget grid>> [
[ length>> ] [ underlying>> length random-bytes ] bi
bit-array boa
] map! drop gadget relayout-1 ;
:: com-glider ( gadget -- )
gadget grid>> :> grid