We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
https://github.com/seagreen/fpg-depths/blob/master/src/Building.elm#L10
Using Maybe can sometimes hide the domain meaning. Perhaps what you really have is something along the lines of
Maybe
type BuildingCombatType = NotCombat | Combat { firepower : Int, sensors : Int }
(those names are bad, but perhaps better than using Maybe)
Or even move this up a ways, so you have a type alias for building stats, one for combat stats, then each building is something like
type Building = NonCombat BuildingData | Combat BuildingData CombatStats
Just a thought.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
https://github.com/seagreen/fpg-depths/blob/master/src/Building.elm#L10
Using
Maybe
can sometimes hide the domain meaning. Perhaps what you really have is something along the lines of(those names are bad, but perhaps better than using
Maybe
)Or even move this up a ways, so you have a type alias for building stats, one for combat stats, then each building is something like
Just a thought.
The text was updated successfully, but these errors were encountered: