Beispiel #1
0
 /*
  * @see org.gamegineer.table.net.ITableNetwork#giveControl(org.gamegineer.table.net.IPlayer)
  */
 @Override
 public void giveControl(final IPlayer player) {
   final INodeController nodeController = nodeControllerRef_.get();
   if (nodeController != null) {
     final IPlayer nodeControllerPlayer = nodeController.getPlayer();
     assert nodeControllerPlayer != null;
     ThreadPlayer.setPlayerName(nodeControllerPlayer.getName());
     try {
       nodeController.giveControl(player.getName());
     } finally {
       ThreadPlayer.setPlayerName(null);
     }
   }
 }