Skip to content

Commit 9f9a32e

Browse files
author
Julien Poulton
committed
Merge branch '5111-fairgame-config' into 'master'
fix(sdk): Game contributions can have fairGame configured See merge request codingame/game-engine!191
2 parents 8e8ed25 + 29c5512 commit 9f9a32e

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

runner/src/main/java/com/codingame/gameengine/runner/ConfigHelper.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,15 @@ public static class QuestionConfig {
122122
private Map<Integer, String> criteriaLanguageMap = new HashMap<Integer, String>();
123123
private String sortingOrder;
124124
private String questionType;
125+
private Boolean ignoreDraws;
126+
127+
public Boolean getIgnoreDraws() {
128+
return ignoreDraws;
129+
}
130+
131+
public void setIgnoreDraws(Boolean ignoreDraws) {
132+
this.ignoreDraws = ignoreDraws;
133+
}
125134

126135
//Used to sort test cases by their filename number
127136
private Map<Integer, TestCase> testCaseDtoMap = new TreeMap<>();
@@ -369,12 +378,14 @@ public GameConfig findConfig(Path rootDir) throws IOException {
369378
String criteriaFr = config.getProperty("criteria_fr");
370379
String sortingOrder = config.getProperty("sorting_order");
371380
String questionType = config.getProperty("type");
381+
String ignoreDraws = config.getProperty("ignore_draws");
372382

373383
questionConfig.setMinPlayers(minPlayers != null ? Integer.valueOf(minPlayers) : null);
374384
questionConfig.setMaxPlayers(maxPlayers != null ? Integer.valueOf(maxPlayers) : null);
375385
questionConfig.setCriteria(criteria);
376386
questionConfig.setSortingOrder(sortingOrder);
377387
questionConfig.setQuestionType(questionType);
388+
questionConfig.setIgnoreDraws(ignoreDraws != null ? Boolean.valueOf(ignoreDraws) : null);
378389

379390
if (sortingOrder != null && criteria != null) {
380391
if (criteriaEn != null) {

0 commit comments

Comments
 (0)