@@ -39,7 +39,6 @@ enum GameType {
39
39
}
40
40
41
41
public static class GameConfig {
42
- private String title ;
43
42
private boolean leaguesDetected ;
44
43
private GameType gameType ;
45
44
private Map <String , QuestionConfig > questionsConfig = new HashMap <>();
@@ -67,14 +66,6 @@ public boolean isLeaguesDetected() {
67
66
public void setLeaguesDetected (boolean leaguesDetected ) {
68
67
this .leaguesDetected = leaguesDetected ;
69
68
}
70
-
71
- public String getTitle () {
72
- return title ;
73
- }
74
-
75
- public void setTitle (String title ) {
76
- this .title = title ;
77
- }
78
69
}
79
70
80
71
class TestCase {
@@ -117,7 +108,6 @@ public void setIsValidator(Boolean isValidator) {
117
108
}
118
109
119
110
public static class QuestionConfig {
120
- private String title ;
121
111
private boolean configDetected ;
122
112
private Map <Integer , String > statementsLanguageMap = new HashMap <Integer , String >();
123
113
private Map <Integer , String > welcomeLanguageMap = new HashMap <Integer , String >();
@@ -185,14 +175,6 @@ public List<TestCase> getTestCases() {
185
175
return testCases ;
186
176
}
187
177
188
- public String getTitle () {
189
- return title ;
190
- }
191
-
192
- public void setTitle (String title ) {
193
- this .title = title ;
194
- }
195
-
196
178
public Map <Integer , String > getStatementsLanguageMap () {
197
179
return statementsLanguageMap ;
198
180
}
@@ -266,8 +248,6 @@ public void setConfigDetected(boolean configDetected) {
266
248
}
267
249
268
250
public void merge (QuestionConfig defaultConfig ) {
269
- this .title = ObjectUtils .firstNonNull (title , defaultConfig .title );
270
-
271
251
this .statementsLanguageMap = firstNonNullOrEmptyMap (
272
252
statementsLanguageMap ,
273
253
defaultConfig .statementsLanguageMap
@@ -383,7 +363,6 @@ public GameConfig findConfig(Path rootDir) throws IOException {
383
363
try (FileInputStream is = new FileInputStream (p .toFile ())) {
384
364
config .load (is );
385
365
386
- String title = config .getProperty ("title" );
387
366
String minPlayers = config .getProperty ("min_players" );
388
367
String maxPlayers = config .getProperty ("max_players" );
389
368
String criteria = config .getProperty ("criteria" );
@@ -392,7 +371,6 @@ public GameConfig findConfig(Path rootDir) throws IOException {
392
371
String sortingOrder = config .getProperty ("sorting_order" );
393
372
String questionType = config .getProperty ("type" );
394
373
395
- questionConfig .setTitle (title );
396
374
questionConfig .setMinPlayers (minPlayers != null ? Integer .valueOf (minPlayers ) : null );
397
375
questionConfig .setMaxPlayers (maxPlayers != null ? Integer .valueOf (maxPlayers ) : null );
398
376
questionConfig .setCriteria (criteria );
@@ -454,7 +432,6 @@ public GameConfig findConfig(Path rootDir) throws IOException {
454
432
});
455
433
456
434
QuestionConfig defaultConfig = questionsConfig .get ("" );
457
- gameConfig .setTitle (defaultConfig .getTitle ());
458
435
459
436
// If there is more than 1 element in leagues, then we have a real league system and the empty string key in leagues
460
437
// represents the default value. So if we have a real league system, we will remove the default config and override
@@ -463,11 +440,6 @@ public GameConfig findConfig(Path rootDir) throws IOException {
463
440
questionsConfig .remove ("" );
464
441
for (String leagueKey : questionsConfig .keySet ()) {
465
442
QuestionConfig questionConfig = questionsConfig .get (leagueKey );
466
- // If not set, we force the title of the league with the concatenation of the main title and the league dir. name
467
- ObjectUtils .firstNonNull (
468
- questionConfig .title ,
469
- String .format ("%s - %s" , defaultConfig .title , leagueKey )
470
- );
471
443
questionConfig .merge (defaultConfig );
472
444
questionConfig .configDetected = isPresentConfigIni (gameConfig , questionConfig );
473
445
}
@@ -519,7 +491,6 @@ public GameConfig findConfig(Path rootDir) throws IOException {
519
491
}
520
492
521
493
private boolean isPresentConfigIni (GameConfig gameConfig , QuestionConfig questionConfig ) {
522
- return gameConfig .getTitle () != null
523
- || questionConfig .minPlayers != null || questionConfig .maxPlayers != null ;
494
+ return questionConfig .minPlayers != null || questionConfig .maxPlayers != null ;
524
495
}
525
496
}
0 commit comments