DragonDice

Check-in [58a729d0be]
Login

Check-in [58a729d0be]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Corrected computation of race without subrace
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 58a729d0beb9e71a22d52a34ec8ef82de1a661b8ed31395c8ccd8a99901cdfef
User & Date: murphy 2020-04-28 23:03:43.000
Context
2020-04-29
09:34
Frontend tweaks, split help text into multiple topics rather than bombarding the user with messages check-in: 76166a5ce7 user: murphy tags: trunk
2020-04-28
23:03
Corrected computation of race without subrace check-in: 58a729d0be user: murphy tags: trunk
22:55
Commands to edit professions check-in: 7560d20b5b user: murphy tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to DragonDice/Race.fs.
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
  let All =
    Enum.GetValues(typeof<Race>)
    |> Seq.cast<Race>
    |> Set.ofSeq
    
  /// Map a subrace tag to the unspecific race tag.
  let withoutSubrace (race:Race) =
    (int race >>> 4) &&& 0xF
    |> enum<Race>
    
  /// Race-specific size.
  let size race =
    match withoutSubrace race with
    | Race.Halfling
    | Race.Gnome    -> Size.Small







|







59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
  let All =
    Enum.GetValues(typeof<Race>)
    |> Seq.cast<Race>
    |> Set.ofSeq
    
  /// Map a subrace tag to the unspecific race tag.
  let withoutSubrace (race:Race) =
    int race &&& 0xF0
    |> enum<Race>
    
  /// Race-specific size.
  let size race =
    match withoutSubrace race with
    | Race.Halfling
    | Race.Gnome    -> Size.Small