Skip to content

Instantly share code, notes, and snippets.

@jasondown
Last active January 24, 2019 03:51
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 jasondown/d33638b89c35e63865fe88e565e3905b to your computer and use it in GitHub Desktop.
Save jasondown/d33638b89c35e63865fe88e565e3905b to your computer and use it in GitHub Desktop.
type Rank = int // <------------------- new type alias
type DiagnosedSampleData =
{ Id : Id
CarriedBy : Player
Rank : Rank // <------------------- New field
HealthPoints : HealthPoints
Molecules : MoleculeStorage }
static member Create (token : Token) =
{ Id = (int <| token.[0])
CarriedBy = Player.Create (int <| token.[1])
Rank = (int <| token.[2]) // <------------------- No longer ignored
// gain : ignore (token.[3]) for wood 1
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