예제 #1
0
 private void createContent() {
   items.setSeed(rand.getSeed());
   properties.setSeed(rand.getSeed());
   while (content.size() < 100) {
     String property = properties.random();
     String item = items.random();
     String newItem = property + " " + item;
     if (!contains(newItem)) {
       int price = rand.nextInt(1, 50);
       price *= 5;
       put(newItem, price);
     }
   }
 }
예제 #2
0
 public int size() {
   return content.size();
 }