Constructor and Description |
---|
FailureNoise(double p,
java.util.Random random)
Construct a FailureNoise object.
|
Modifier and Type | Method and Description |
---|---|
AKSpeak |
applyNoise(AKSpeak message)
Optionally apply some noise to a message and return either the original message or a replacement.
|
public FailureNoise(double p, java.util.Random random)
p
- The probability of dropping a message.random
- The RNG to use.public AKSpeak applyNoise(AKSpeak message)
Noise
applyNoise
in interface Noise
message
- The message to tinker with.