示例#1
0
 public boolean canVend(int coins) {
   return content.get(0).cost <= coins;
 }
示例#2
0
 public Item random(int coins, Randomizer rand) {
   Integer max = itemsForCoins.get(coins);
   if (max == null) max = items.size() - 1;
   return content.get(rand.nextInt(0, max));
 }