add rating as we go
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
"scripts": {
|
||||
"dev": "vite dev",
|
||||
"build": "vite build",
|
||||
"publish": "NODE_ENV=production vite build && gh-pages -d build -t true",
|
||||
"publish": "pnpm run check && pnpm run lint && NODE_ENV=production vite build && gh-pages -d build -t true",
|
||||
"preview": "vite preview",
|
||||
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
|
||||
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
$: currentScoreEditing = scoreEditing > -1 ? currentGameEditing.scores[scoreEditing] : null;
|
||||
$: gamesComplete = $storedGames.filter((g) => g.isComplete);
|
||||
$: gamesCompletedWithRating = calculateRatingForGames(gamesComplete);
|
||||
$: currentGameRating = calculateRating([currentGameEditing]);
|
||||
$: completedStats = calculateTotalGameStats(gamesComplete);
|
||||
$: disableEditing = currentGameEditing.isComplete && scoreEditing === -1;
|
||||
$: storedGames;
|
||||
@@ -186,6 +187,9 @@
|
||||
<section>
|
||||
<div class="stats">
|
||||
<div>Score {currentGameEditing.totalScore}</div>
|
||||
<div>
|
||||
Rating: {currentGameRating}
|
||||
</div>
|
||||
<div>
|
||||
Throw: {currentGameEditing.scores.length < 10
|
||||
? currentGameEditing.scores.length + 1
|
||||
|
||||
Reference in New Issue
Block a user