From 7e0a9ca0c35be3f6a4c0f37ec36df9c5196da442 Mon Sep 17 00:00:00 2001 From: asvitkine Date: Fri, 29 Sep 2023 12:14:45 -0400 Subject: [PATCH] Expand comment and remove unused imports. --- .../games/strategy/triplea/delegate/AbstractPlaceDelegate.java | 2 ++ .../java/games/strategy/triplea/delegate/PlaceDelegateTest.java | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/game-app/game-core/src/main/java/games/strategy/triplea/delegate/AbstractPlaceDelegate.java b/game-app/game-core/src/main/java/games/strategy/triplea/delegate/AbstractPlaceDelegate.java index 2b67e388b7d..47ec1c9ffb8 100644 --- a/game-app/game-core/src/main/java/games/strategy/triplea/delegate/AbstractPlaceDelegate.java +++ b/game-app/game-core/src/main/java/games/strategy/triplea/delegate/AbstractPlaceDelegate.java @@ -992,6 +992,8 @@ protected Collection getUnitsToBePlaced( // Filter each type separately, since we don't want a max on one type to filter out all units of // another type, if the two types have a combined limit. UnitStackingLimitFilter doesn't do // that directly since other call sites (e.g. move validation) do need the combined filtering. + // But we need to do it this way here, since the result will be shown for choosing which units + // to build (where we want to show all the types that can be built). final var result = new ArrayList(); for (UnitType ut : UnitUtils.getUnitTypesFromUnitList(units)) { result.addAll( diff --git a/game-app/game-core/src/test/java/games/strategy/triplea/delegate/PlaceDelegateTest.java b/game-app/game-core/src/test/java/games/strategy/triplea/delegate/PlaceDelegateTest.java index 8760440b521..724754e63df 100644 --- a/game-app/game-core/src/test/java/games/strategy/triplea/delegate/PlaceDelegateTest.java +++ b/game-app/game-core/src/test/java/games/strategy/triplea/delegate/PlaceDelegateTest.java @@ -10,7 +10,6 @@ import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.containsInAnyOrder; import static org.hamcrest.Matchers.hasSize; -import static org.hamcrest.Matchers.not; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; @@ -19,7 +18,6 @@ import games.strategy.engine.data.UnitType; import games.strategy.engine.delegate.IDelegateBridge; import games.strategy.triplea.delegate.data.PlaceableUnits; -import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.List;