Skip to content

Commit

Permalink
Show difficulty level on End of Game page
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanseifert committed Nov 26, 2024
1 parent e8babaa commit baa8b50
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/components/turn/EndOfGame.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,19 @@
<li v-html="t('endOfGame.researchScoring')"></li>
<li v-html="t('endOfGame.resourceScoring')"></li>
</ol>
<p>{{t('setup.difficultyLevel.title')}}: <b>{{t(`difficultyLevel.${state.setup.difficultyLevel}`)}}</b></p>
<p>
<i>{{t('setup.difficultyLevel.title')}}:</i>&nbsp;
<img src="@/assets/icons/difficulty-level.png" class="difficultyLevelIcon" v-for="level in difficultyLevel" :key="level" alt=""/>
&nbsp;<i>{{t(`difficultyLevel.${difficultyLevel}`)}}</i>
</p>
</template>

<script lang="ts">
import { useStateStore } from '@/store/state'
import { defineComponent } from 'vue'
import { useI18n } from 'vue-i18n'
import ScoringFinalTile from '@/services/enum/ScoringFinalTile'
import DifficultyLevel from '@/services/enum/DifficultyLevel'
export default defineComponent({
name: 'EndOfGame',
Expand All @@ -32,6 +37,9 @@ export default defineComponent({
computed: {
isScoringFinalTileFederationStructures() : boolean {
return (this.state.setup.scoringFinalTiles ?? []).includes(ScoringFinalTile.FEDERATION_STRUCTURES)
},
difficultyLevel() : DifficultyLevel {
return this.state.setup.difficultyLevel
}
}
})
Expand All @@ -41,4 +49,7 @@ export default defineComponent({
ol > li {
margin-top: 0.5rem;
}
.difficultyLevelIcon {
height: 1.5rem;
}
</style>

0 comments on commit baa8b50

Please sign in to comment.