Skip to content

Instantly share code, notes, and snippets.

@IntegerMan
Created October 21, 2019 04:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save IntegerMan/e16fb0335df491007ad064fb9142ea7b to your computer and use it in GitHub Desktop.
Save IntegerMan/e16fb0335df491007ad064fb9142ea7b to your computer and use it in GitHub Desktop.
let moveRandomly state actor getRandomNumber =
let current = actor.Pos
let movedPos = getCandidates(current, state.World, false)
|> Seq.sortBy(fun _ -> getRandomNumber 1000)
|> Seq.head
moveActor state actor movedPos
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment