Package com.csse3200.game.utils
Class ShopRandomizer
java.lang.Object
com.csse3200.game.utils.ShopRandomizer
A utility class for randomizing the shop items. Takes the profile name as a seed, and based on
the current time, it will return 3 random indexes for the shop items. This means the items will
be different for each profile, but the same for each hour.
-
Method Summary
Modifier and TypeMethodDescriptionstatic int[]
getShopItemIndexes
(String seed, int min, int max, LocalDateTime dateTime) Gets the indexes of the shop items.
-
Method Details
-
getShopItemIndexes
Gets the indexes of the shop items.- Parameters:
seed
- the seed for the random number generatormin
- the minimum value for the random number generatormax
- the maximum value for the random number generatordateTime
- the date and time to use for the random number generator- Returns:
- the indexes of the shop items
-