Skip to content

Instantly share code, notes, and snippets.

@IntegerMan
Created October 6, 2019 03:20
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/90fb8f2a0a6a088b316dd64ed75d698e to your computer and use it in GitHub Desktop.
Save IntegerMan/90fb8f2a0a6a088b316dd64ed75d698e to your computer and use it in GitHub Desktop.
let getCharacterAtCell(x, y) (world:World) =
let actorAtCell =
world.Actors
|> Seq.tryFind(fun actor -> actor.Pos.X = x && actor.Pos.Y = y)
match actorAtCell with
| Some actor -> getChar actor
| None -> '.'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment