diff --git a/pom.xml b/pom.xml
index fd02624..fd64e27 100644
--- a/pom.xml
+++ b/pom.xml
@@ -10,7 +10,7 @@
ir.sharif.aic
hideandseek
- 0.2.4
+ 0.2.6
HideAndSeek
the implementation of aic 2022 game server
diff --git a/src/main/java/ir/sharif/aic/hideandseek/config/GameConfigInjector.java b/src/main/java/ir/sharif/aic/hideandseek/config/GameConfigInjector.java
index 020d2b2..cb08878 100644
--- a/src/main/java/ir/sharif/aic/hideandseek/config/GameConfigInjector.java
+++ b/src/main/java/ir/sharif/aic/hideandseek/config/GameConfigInjector.java
@@ -122,7 +122,11 @@ public GameConfig createGameConfig() throws IOException {
clientReadinessThresholdTimeMillisecond, magicTurnTime);
log.info("clientReadinessThresholdTimeMillisecond is set to {}", clientReadinessThresholdTimeMillisecond);
log.info("magicTurnTime is set to {}", magicTurnTime);
- settings.agents.forEach(config::addAgent);
+ settings.agents.forEach(e -> {
+ if(e.is(AgentType.JOKER))
+ e.setNodeId(config.getAllNodes().size() - 1);
+ config.addAgent(e);
+ });
var firstTeamRunCMD = createRunCMD(FIRST_TEAM_PATH);
var secondTeamRunCMD = createRunCMD(SECOND_TEAM_PATH);
settings.agents.forEach(agent -> {