Skip to content

Commit c5f7f5f

Browse files
Merge pull request #4 from SharifAIChallenge/dev
Add ApAddition to GameConstants
2 parents f5e8a8c + 12fc243 commit c5f7f5f

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

client/src/Core/Message/Parse/InitMessage.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ void InitMessage::update_game(Game *game) {
2626

2727
json json_game_const = root["gameConstants"];
2828
game->game_constants_.max_ap_ = json_game_const["maxAP"];
29+
game->game_constants_.ap_addition_ = json_game_const["apAddition"];
2930
game->game_constants_.max_turns_ = json_game_const["maxTurns"];
3031
game->game_constants_.turn_timeout_ = json_game_const["turnTimeout"];
3132
game->game_constants_.pick_timeout_ = json_game_const["pickTimeout"];

client/src/Model/GameConstants.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ int GameConstants::getMaxAp() const{
44
return max_ap_;
55
}
66

7+
int GameConstants::getApAddition() const {
8+
return ap_addition_;
9+
}
10+
711
int GameConstants::getMaxTurns() const{
812
return max_turns_;
913
}

client/src/Model/GameConstants.h

+3
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ class GameConstants {
1010

1111
int getMaxAp() const;
1212

13+
int getApAddition() const;
14+
1315
int getMaxTurns() const;
1416

1517
int getTurnTimeout() const;
@@ -30,6 +32,7 @@ class GameConstants {
3032

3133
private:
3234
int max_ap_;
35+
int ap_addition_;
3336
int max_turns_;
3437
int turn_timeout_;
3538
int pick_timeout_;

0 commit comments

Comments
 (0)