Skip to content

Instantly share code, notes, and snippets.

@IntegerMan
Created October 6, 2019 03:17
Embed
What would you like to do?
module MattEland.FSharpGeneticAlgorithm.Logic.Actors
open MattEland.FSharpGeneticAlgorithm.Logic.WorldPos
type ActorKind =
| Squirrel of hasAcorn:bool
| Tree
| Acorn
| Rabbit
| Doggo
type Actor =
{ Pos : WorldPos
ActorKind : ActorKind }
let getChar actor =
match actor.ActorKind with
| Squirrel _ -> 'S'
| Tree _ -> 't'
| Acorn _ -> 'a'
| Rabbit _ -> 'R'
| Doggo _ -> 'D'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment