Esempio n. 1
0
 @Override
 public int loop() {
   for (Strategy currentStrategy : strategies) {
     if (currentStrategy.isValid()) {
       painter.setTotalMoneyMade(moneyHandler.getTotalMoneyMade());
       currentStrategy.execute();
     }
   }
   return Random.nextInt(300, 600);
 }
Esempio n. 2
0
 private V execute(Strategy strategy, K key, V value) {
   Object keyReference = referenceKey(key);
   return (V) strategy.execute(this, keyReference, referenceValue(keyReference, value));
 }