Tech
38 clamps, four probits, and one coefficient rounded to 15 digits
We have around 150 scorers, one per practice game, each converting a finished game state into a score. They live under scoring/scorers/ and were written as self-contained units, which is the right shape: the scoring rules genuinely differ per game, and a shared base class would be a lie about how much they have in common.
What they did have in common was arithmetic. Before this cleanup the codebase contained:
38 local definitions of clamp , in three mutually incompatible signatures
...
Read the full discussion on Dev.to
This article was aggregated from Dev.to. Click to join the conversation.
View on Dev.to