The Visitor interface used for Game::forEachCardInGame could/should probably be reworked using JavaStream.
Either as Predicate, Consumer or Collector.
For this to clean up, classes like Zone/PlayerZone should return a (filtered) Stream of their cards instead of CardCollection objects.
I need to check out if Stream.concat or Stream.Builder is better for this.
The Visitor interface used for
Game::forEachCardInGamecould/should probably be reworked using JavaStream.Either as Predicate, Consumer or Collector.
For this to clean up, classes like Zone/PlayerZone should return a (filtered) Stream of their cards instead of CardCollection objects.
I need to check out if
Stream.concatorStream.Builderis better for this.