Search in sources :

Example 1 with DefaultPlayerBridge

use of games.strategy.engine.gamePlayer.DefaultPlayerBridge in project triplea by triplea-game.

the class AbstractGame method setupLocalPlayers.

private void setupLocalPlayers(final Set<IGamePlayer> localPlayers) {
    final PlayerList playerList = gameData.getPlayerList();
    for (final IGamePlayer gp : localPlayers) {
        final PlayerID player = playerList.getPlayerId(gp.getName());
        gamePlayers.put(player, gp);
        final IPlayerBridge bridge = new DefaultPlayerBridge(this);
        gp.initialize(bridge, player);
        final RemoteName descriptor = ServerGame.getRemoteName(gp.getPlayerId(), gameData);
        remoteMessenger.registerRemote(gp, descriptor);
    }
}
Also used : IGamePlayer(games.strategy.engine.gamePlayer.IGamePlayer) DefaultPlayerBridge(games.strategy.engine.gamePlayer.DefaultPlayerBridge) PlayerID(games.strategy.engine.data.PlayerID) RemoteName(games.strategy.engine.message.RemoteName) PlayerList(games.strategy.engine.data.PlayerList) IPlayerBridge(games.strategy.engine.gamePlayer.IPlayerBridge)

Aggregations

PlayerID (games.strategy.engine.data.PlayerID)1 PlayerList (games.strategy.engine.data.PlayerList)1 DefaultPlayerBridge (games.strategy.engine.gamePlayer.DefaultPlayerBridge)1 IGamePlayer (games.strategy.engine.gamePlayer.IGamePlayer)1 IPlayerBridge (games.strategy.engine.gamePlayer.IPlayerBridge)1 RemoteName (games.strategy.engine.message.RemoteName)1