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