Verified Commit 01d7a4b7 authored by Camil Staps's avatar Camil Staps 🙂

In Ligretto, the random integers don't need to be capped at JS_MAX_INT because...

In Ligretto, the random integers don't need to be capped at JS_MAX_INT because these integers now live in WebAssembly
parent 06be3a98
......@@ -12,15 +12,9 @@ play_Ligretto
>>= \me -> invite_friends
>>= \them -> let us = zip2 (colors (1+length them)) [me : them]
in allTasks (repeatn (length us) (get randomInt))
>>= \rs -> let gameSt = init_gameSt us (map limitInt rs)
>>= \rs -> let gameSt = init_gameSt us rs
in withShared gameSt (play_game us)
MAX_JS_INT :== 0x7FFFFFFE
limitInt n
| n < MAX_JS_INT = n
| otherwise = MAX_JS_INT
invite_friends :: Task [User]
invite_friends
= enterMultipleChoiceWithShared "Select friends to play with" [] users
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment