Interface NumberGenerator
- All Known Implementing Classes:
ListNumberGenerator
,RandomNumberGenerator
public interface NumberGenerator
This simple interface produces numbers.
It is used in MarkovChain and ProbabilityDistribution with just two implementations: RandomNumberGenerator and ListNumberGenerator, the first of which is useful for producing random numbers and thus is good for the bot in practice, the latter of which can be passed a list for deterministic testing of the bot.
-
Method Summary
Modifier and Type Method Description int
next(int bound)
Generates a number based of off a specified bound.
-
Method Details
-
next
int next(int bound)Generates a number based of off a specified bound.- Parameters:
bound
- - the max value that can be returned by the generator.- Returns:
- a number based off of the bound.
-