Skip to content

Commit 38c761f

Browse files
committed
stats
1 parent d384c6b commit 38c761f

1 file changed

Lines changed: 35 additions & 18 deletions

File tree

src/components/scoring/FinalScoring.vue

Lines changed: 35 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -163,32 +163,49 @@ export default defineComponent({
163163
},
164164
mounted() {
165165
// send anonymous game stats - max. once per game
166-
/*
167166
if (!this.state.gameStatsSend) {
168-
const totalWarSteps_Automa = 0
169167
const stats = {
170168
version,
171-
totalVP: this.totalVPPlayer,
172-
scoringTrackVP: this.amount.scoringTrackVP[0],
173-
prosperityVP: this.amount.prosperityVP[0],
174-
populationVP: this.amount.populationVP[0],
175-
cultureVP: this.amount.cultureVP[0],
176-
influenceSteps: this.amount.influenceSteps[0],
177-
politicsSteps: this.amount.politicsSteps[0],
178-
warSteps: this.amount.warSteps[0],
179-
wonderVPs: this.amount.wonderVPs[0],
180-
yellowBuildingVPs: this.amount.yellowBuildingVPs[0],
181-
diplomacyCardCount: this.amount.diplomacyCardCount[0],
182-
scoringTrackVP_Automa: this.amount.scoringTrackVP[1],
183-
warSteps_Automa: this.amount.warSteps[1],
184-
totalWarSteps_Automa
169+
difficultyLevel: -1,
170+
playerPower: 'TODO',
171+
playerTotalVP: this.totalVPPlayer,
172+
playerScoreTrackVP: toNumber(this.amount.scoreTrackVP[0]),
173+
playerMilestonesVP: toNumber(this.amount.milestonesVP[0]),
174+
playerBillboardsVP: this.getBillboardVP(0),
175+
playerFloricultureVP: this.getFloricultureVP(0),
176+
playerExtensionsVP: this.getExtensionsVP(0),
177+
playerLeftoverResourcesVP: this.getLeftoverResourcesVP(0),
178+
botTotalVP: this.totalVP[1],
179+
botScoreTrackVP: toNumber(this.amount.scoreTrackVP[1]),
180+
botMilestonesVP: toNumber(this.amount.milestonesVP[1]),
181+
botBillboardsVP: this.getBillboardVP(1),
182+
botFloricultureVP: this.getFloricultureVP(1),
183+
playerBillboardsWon: this.amount.billboardsWon.filter(p => p == Player.PLAYER).length,
184+
botBillboardsWon: this.amount.billboardsWon.filter(p => p == Player.BOT).length,
185+
playerFloricultureSteps: 0,
186+
botFloricultureSteps: 0,
187+
playerExtensionSmall: toNumber(this.amount.playerGardenExtensionsSmall),
188+
playerExtensionLarge: toNumber(this.amount.playerGardenExtensionsLarge),
189+
playerTurnsRound1: 0,
190+
playerTurnsRound2: 0,
191+
playerTurnsRound3: 0,
192+
playerTurnsRound4: 0,
193+
playerTurnsRound5: 0,
194+
playerTurnsRound6: 0,
195+
playerTurnsRound7: 0,
196+
playerTurnsRound8: 0,
197+
playerTurnsRound9: 0,
198+
playerTurnsRound10: 0,
199+
playerTurnsRound11: 0,
200+
playerTurnsRound12: 0,
201+
playerTurnsTotal: 0,
202+
botTurnsTotal: 0
185203
}
186204
postGameStats(stats,
187205
import.meta.env.VITE_STATS_FORM_URL,
188206
import.meta.env.VITE_STATS_FIELD_MAPPING)
189-
this.state.gameStatsSend = true
207+
// TODO: this.state.gameStatsSend = true
190208
}
191-
*/
192209
}
193210
})
194211
</script>

0 commit comments

Comments
 (0)