Skip to content

Commit

Permalink
changed args order
Browse files Browse the repository at this point in the history
  • Loading branch information
Yuvalz19500 committed Sep 8, 2023
1 parent 1d117b4 commit eb30f96
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/ArgsSerializer/ArgsSerializer.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ public GameArguments serialize() throws NotEnoughArgumentsException, InvalidGame
}

int numberOfAgents = Integer.parseInt(arguments[0]);
double probability = Double.parseDouble(arguments[1]);
String game = arguments[2];
String game = arguments[1];
double probability = Double.parseDouble(arguments[2]);


if(game.equals(GameType.PD.getValue())){
return new GameArguments(numberOfAgents, probability, GameType.PD);
Expand All @@ -45,7 +46,6 @@ public GameArguments serialize() throws NotEnoughArgumentsException, InvalidGame
}

float fraction = Float.parseFloat(arguments[3]);

return new GameArguments(numberOfAgents, probability, GameType.BoS, fraction);
}

Expand Down

0 comments on commit eb30f96

Please sign in to comment.