@kuncat/avoidant 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -533,14 +533,26 @@
|
|
|
533
533
|
onblur={() => (isScoreBreakdownHovered = false)}
|
|
534
534
|
onkeydown={handleScoreSummaryKeydown}
|
|
535
535
|
>
|
|
536
|
-
{m.label_score()}:
|
|
537
|
-
<
|
|
536
|
+
{m.label_score()}:
|
|
537
|
+
<strong class="text-slate-200!"
|
|
538
|
+
>{Math.round($score.score).toLocaleString(getLocale())}</strong
|
|
539
|
+
>
|
|
540
|
+
<span class="opacity-70"
|
|
541
|
+
>({$score.efficiency.toLocaleString(getLocale(), {
|
|
542
|
+
maximumFractionDigits: 0,
|
|
543
|
+
style: "percent",
|
|
544
|
+
})})</span
|
|
545
|
+
>
|
|
538
546
|
{#if $score.completed}
|
|
539
547
|
<span class="font-semibold text-emerald-600!">{m.text_avoided()}</span>
|
|
540
548
|
{:else}
|
|
541
549
|
<span class="opacity-80">
|
|
542
|
-
{m.label_safe_cells_remaining({
|
|
543
|
-
|
|
550
|
+
{m.label_safe_cells_remaining({
|
|
551
|
+
count: numSafeUnexploredCells.toLocaleString(getLocale()),
|
|
552
|
+
})}:
|
|
553
|
+
<strong class="text-slate-200!"
|
|
554
|
+
>{numSafeUnexploredCells.toLocaleString(getLocale())}</strong
|
|
555
|
+
>
|
|
544
556
|
</span>
|
|
545
557
|
{/if}
|
|
546
558
|
</div>
|
|
@@ -549,17 +561,22 @@
|
|
|
549
561
|
<div id="score-breakdown" class="score-breakdown" role="status">
|
|
550
562
|
{#if $score.streak > 1}<p>
|
|
551
563
|
<span class="opacity-70"
|
|
552
|
-
>×{(1 + Math.min($score.streak, 10) * 0.1).
|
|
564
|
+
>×{(1 + Math.min($score.streak, 10) * 0.1).toLocaleString(getLocale(), {
|
|
565
|
+
maximumFractionDigits: 1,
|
|
566
|
+
})}
|
|
553
567
|
{m.label_streak()}</span
|
|
554
568
|
>
|
|
555
569
|
</p>
|
|
556
570
|
{/if}
|
|
557
571
|
<p class="text-emerald-600!">
|
|
558
|
-
{m.label_safe_cells_explored({
|
|
559
|
-
|
|
572
|
+
{m.label_safe_cells_explored({
|
|
573
|
+
count: $score.safeExplored.toLocaleString(getLocale()),
|
|
574
|
+
})}:
|
|
575
|
+
<strong>{$score.safeExplored.toLocaleString(getLocale())}</strong>
|
|
560
576
|
</p>
|
|
561
577
|
<p class="text-rose-500!">
|
|
562
|
-
{m.label_voids_discovered()}:
|
|
578
|
+
{m.label_voids_discovered()}:
|
|
579
|
+
<strong>{$score.voidExplored.toLocaleString(getLocale())}</strong>
|
|
563
580
|
</p>
|
|
564
581
|
</div>
|
|
565
582
|
{/if}
|
|
@@ -6,7 +6,7 @@ import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
|
|
6
6
|
/** @typedef {{}} Tutorial_Awaiting_First_ClickInputs */
|
|
7
7
|
|
|
8
8
|
const en_tutorial_awaiting_first_click = /** @type {(inputs: Tutorial_Awaiting_First_ClickInputs) => LocalizedString} */ () => {
|
|
9
|
-
return /** @type {LocalizedString} */ (`The map is now interactive. Press any cell to reveal it and remember your goal is to avoid pressing "void" cells. Each safe cell with any void neighbors shows a number indicating how many of their
|
|
9
|
+
return /** @type {LocalizedString} */ (`The map is now interactive. Press any cell to reveal it and remember your goal is to avoid pressing "void" cells. Each safe cell with any void neighbors shows a number indicating how many of their neighbors are voids. As you explore the map, use that information to try to deduce which cells are safe and which are void. Good luck!`)
|
|
10
10
|
};
|
|
11
11
|
|
|
12
12
|
const bn_tutorial_awaiting_first_click = /** @type {(inputs: Tutorial_Awaiting_First_ClickInputs) => LocalizedString} */ () => {
|
package/dist/tutorial.svelte.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { m } from "./paraglide/messages";
|
|
2
|
+
import { getLocale } from "./paraglide/runtime";
|
|
2
3
|
export class TutorialState {
|
|
3
4
|
phase = $state({ kind: "intro" });
|
|
4
5
|
get text() {
|
|
@@ -14,7 +15,9 @@ export class TutorialState {
|
|
|
14
15
|
case "afterSafeDeducible":
|
|
15
16
|
return m.tutorial_after_safe_deducible();
|
|
16
17
|
case "won":
|
|
17
|
-
return m.tutorial_won({
|
|
18
|
+
return m.tutorial_won({
|
|
19
|
+
percent: Math.round(this.phase.efficiency * 100).toLocaleString(getLocale()),
|
|
20
|
+
});
|
|
18
21
|
case "done":
|
|
19
22
|
return "";
|
|
20
23
|
}
|
package/package.json
CHANGED