Skip to content

Commit

Permalink
Remove an unused method only referenced by tests. (#10492)
Browse files Browse the repository at this point in the history
* Remove an unused method only referenced by tests.

* Remove imports.
  • Loading branch information
asvitkine authored May 23, 2022
1 parent f7cbea7 commit eba93d5
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@
import games.strategy.engine.data.Change;
import games.strategy.engine.data.CompositeChange;
import games.strategy.engine.data.GameData;
import games.strategy.engine.data.GamePlayer;
import games.strategy.triplea.ui.history.HistoryPanel;
import games.strategy.ui.Util;
import java.util.ArrayList;
import java.util.Enumeration;
import java.util.List;
import java.util.Optional;
import javax.swing.tree.DefaultMutableTreeNode;
import javax.swing.tree.DefaultTreeModel;

Expand Down Expand Up @@ -61,13 +59,6 @@ public void goToEnd() {
}
}

public Optional<GamePlayer> getActivePlayer() {
if (currentNode instanceof Step) {
return GamePlayer.asOptional(((Step) currentNode).getPlayerId());
}
return Optional.empty();
}

public HistoryNode getLastNode() {
assertCorrectThread();
return getLastChildInternal((HistoryNode) getRoot());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ private void assertNotNullGameData(final GameData gameData) {
assertThat(gameData.getDiceSides(), is(notNullValue()));
assertThat(gameData.getGameLoader(), is(notNullValue()));
assertThat(gameData.getGameName(), is(notNullValue()));
assertThat(gameData.getHistory().getActivePlayer(), is(notNullValue()));
assertThat(gameData.getHistory().getLastNode(), is(notNullValue()));
assertThat(gameData.getMap().getTerritories(), is(notNullValue()));
assertThat(gameData.getPlayerList().getPlayers(), is(notNullValue()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ void loadSaveGames(final Path saveGame) throws Exception {
assertThat(gameData.getDiceSides(), is(notNullValue()));
assertThat(gameData.getGameLoader(), is(notNullValue()));
assertThat(gameData.getGameName(), is(notNullValue()));
assertThat(gameData.getHistory().getActivePlayer(), is(notNullValue()));
assertThat(gameData.getHistory().getLastNode(), is(notNullValue()));
assertThat(gameData.getMap().getTerritories(), is(notNullValue()));
assertThat(gameData.getPlayerList().getPlayers(), is(notNullValue()));
Expand Down

0 comments on commit eba93d5

Please sign in to comment.