Skip to content

Instantly share code, notes, and snippets.

@IntegerMan
Created October 6, 2019 03:18
Embed
What would you like to do?
let getRandomPos(maxX:int32, maxY:int32, getRandom): WorldPos =
let x = getRandom maxX
let y = getRandom maxY
newPos x y
let buildItemsArray (maxX:int32, maxY:int32, getRandom): Actor array =
[| { Pos = getRandomPos(maxX, maxY, getRandom); ActorKind = Squirrel false }
{ Pos = getRandomPos(maxX, maxY, getRandom); ActorKind = Tree }
{ Pos = getRandomPos(maxX, maxY, getRandom); ActorKind = Doggo }
{ Pos = getRandomPos(maxX, maxY, getRandom); ActorKind = Acorn }
{ Pos = getRandomPos(maxX, maxY, getRandom); ActorKind = Rabbit }
|]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment