Class ShopRandomizer

java.lang.Object
com.csse3200.game.utils.ShopRandomizer

public class ShopRandomizer extends Object
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 Details

    • getShopItemIndexes

      public static int[] getShopItemIndexes(String seed, int min, int max, LocalDateTime dateTime)
      Gets the indexes of the shop items.
      Parameters:
      seed - the seed for the random number generator
      min - the minimum value for the random number generator
      max - the maximum value for the random number generator
      dateTime - the date and time to use for the random number generator
      Returns:
      the indexes of the shop items