Skip to content

Instantly share code, notes, and snippets.

@jasondown
Last active December 30, 2018 06:14
Show Gist options
  • Save jasondown/d64e363f7cf9a018107cc849b0b78b7c to your computer and use it in GitHub Desktop.
Save jasondown/d64e363f7cf9a018107cc849b0b78b7c to your computer and use it in GitHub Desktop.
type Id = int
type SampleData =
{ Id : Id
CarriedBy : Player
HealthPoints : HealthPoints
Molecules : MoleculeStorage }
static member Create (token : Token) =
{ Id = (int <| token.[0])
CarriedBy = Player.Create (int <| token.[1])
// rank : ignore (token.[2]) for wood 2
// gain : ignore (token.[3]) for wood 2
HealthPoints = (int <| token.[4])
Molecules = MoleculeStorage.Create token.[5 .. 9] }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment