Mark BooleanProvider impls as data classes so they can be compared

This commit is contained in:
DBotThePony 2025-03-29 22:06:15 +07:00
parent 07e6369454
commit 9cfbab6c3c
Signed by: DBot
GPG Key ID: DCC23B5715498507

View File

@ -25,7 +25,7 @@ interface BooleanProvider {
/**
* Each time boolean is sampled, there is a fixed chance for it to test true
*/
class Unbiased(val chance: Float) : BooleanProvider, Instance {
data class Unbiased(val chance: Float) : BooleanProvider, Instance {
constructor(chance: Int) : this(1f / chance)
override fun instance(): Instance {
@ -57,7 +57,7 @@ interface BooleanProvider {
*
* Once roll is successful, `failures` is reset back to 1.
*/
class BiasedLinear(val baseChance: Float) : BooleanProvider {
data class BiasedLinear(val baseChance: Float) : BooleanProvider {
constructor(middle: Float, at: Int) : this(middle / at)
private class I(private val baseChance: Float) : Instance {