public void Challenge(EnemyId enemyId) { lock (connectedClients) if (!connectedClients.Values.Any(e => e.EnemyId.SessionNo == enemyId.SessionNo)) { Debug.WriteLine("Challenged " + enemyId.SessionNo + "," + enemyId.Name); DownloadString("?mode=startGame&sessionNo={0}&session={1}", enemyId.SessionNo, sessionId); } }
public NetworkEnemy(Server server, string gameId, EnemyId enemyId) { GameId = gameId; this.server = server; EnemyId = enemyId; }