Simulating Brownian Motion with Elm

Image for post
Image for post

Notes on the Code

Tick newTime ->
if model.simulatorState == Running then
( model, Random.generate MakeMove randomMove )
else
( model, Cmd.none )
randomMove : Random.Generator ( Int, Int )
randomMove =
Random.pair (Random.int 0 10) (Random.int 0 10)

Written by

jxxcarlson on elm slack, http://jxxcarlson.github.io

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store