Skip to content

Commit

Permalink
Small changes for the new question type
Browse files Browse the repository at this point in the history
  • Loading branch information
Mister-Mario committed Apr 25, 2024
1 parent fa773cd commit d5d5059
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion gatewayservice/gateway-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ function validateAmount(amount) {
}

function validateType(type){
return ['POPULATION', 'CAPITAL', 'LANGUAGE', 'SIZE'].includes(type);
return ['POPULATION', 'CAPITAL', 'LANGUAGE', 'SIZE', 'HEAD_OF_GOVERMENT'].includes(type);
}

function validateUser(user){
Expand Down
3 changes: 2 additions & 1 deletion webapp/src/components/GameConfigurator/GameConfigurator.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function GameConfigurator(){
}

function handleClickRandomize() {
const options = ['ALL', 'POPULATION', 'CAPITAL', 'LANGUAGE', 'SIZE'];
const options = ['ALL', 'POPULATION', 'CAPITAL', 'LANGUAGE', 'SIZE', 'HEAD_OF_GOVERMENT'];
const randomOptionIndex = Math.floor(Math.random() * options.length);
setTipoPregunta(options[randomOptionIndex]);

Expand All @@ -37,6 +37,7 @@ function GameConfigurator(){
<option value="CAPITAL">{t("gameConfigurator.option_capital")}</option>
<option value="LANGUAGE">{t("gameConfigurator.option_language")}</option>
<option value="SIZE">{t("gameConfigurator.option_size")}</option>
<option value="HEAD_OF_GOVERMENT">{t("gameConfigurator.option_head_of_goverment")}</option>
</select>
<br></br>

Expand Down
1 change: 1 addition & 0 deletions webapp/src/translations/en/global.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@
"option_capital":"Capital",
"option_language":"Language",
"option_size":"Size",
"option_head_of_goverment":"Head of Goverment",
"custo_game":"Create custom game",
"competi_game":"Play Competitive",
"randomize":"Randomize Parameters"
Expand Down

0 comments on commit d5d5059

Please sign in to comment.