Skip to content

Instantly share code, notes, and snippets.

@IntegerMan
Created October 6, 2019 03:17
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save IntegerMan/ce13f031d8502902bfba178d706c74da to your computer and use it in GitHub Desktop.
Save IntegerMan/ce13f031d8502902bfba178d706c74da to your computer and use it in GitHub Desktop.
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