Skip to content

Commit

Permalink
refactor: change joker default node id in GameConfigInjector
Browse files Browse the repository at this point in the history
version: update to version 0.2.6
  • Loading branch information
Shayan-Shabanzadeh committed Sep 2, 2022
1 parent 7436770 commit a0a8dc8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</parent>
<groupId>ir.sharif.aic</groupId>
<artifactId>hideandseek</artifactId>
<version>0.2.4</version>
<version>0.2.6</version>
<name>HideAndSeek</name>
<description>the implementation of aic 2022 game server</description>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 -> {
Expand Down

0 comments on commit a0a8dc8

Please sign in to comment.