예제 #1
0
 @Override
 public boolean isEnabled(Player self, Likeness action) {
   if (action == Likeness.Action) {
     return self.columnStream().parallel().anyMatch(this::isValidRent);
   }
   return true;
 }
예제 #2
0
 @Override
 public boolean actionPlayed(Player self) {
   int rent =
       self.columnStream()
           .parallel()
           .filter(this::isValidRent)
           .mapToInt(PropertyColumn::getRent)
           .max()
           .orElse(0);
   if (rent == 0) {
     return false;
   }
   return payRequest(self, isGlobal(), rent, "rent");
 }