use of games.strategy.engine.data.PlayerList in project triplea by triplea-game.
the class AbstractRulesAttachment method setPlayers.
private void setPlayers(final String names) throws GameParseException {
final PlayerList pl = getData().getPlayerList();
for (final String p : names.split(":")) {
final PlayerID player = pl.getPlayerId(p);
if (player == null) {
throw new GameParseException("Could not find player. name:" + p + thisErrorMsg());
}
m_players.add(player);
}
}
use of games.strategy.engine.data.PlayerList in project triplea by triplea-game.
the class ParserTest method testAllianceMade.
@Test
public void testAllianceMade() {
final PlayerList players = gameData.getPlayerList();
final PlayerID castro = players.getPlayerId("castro");
final PlayerID chretian = players.getPlayerId("chretian");
final RelationshipTracker alliances = gameData.getRelationshipTracker();
assertTrue(alliances.isAllied(castro, chretian));
}
Aggregations