Skip to content

Commit b2ed524

Browse files
committed
feat(tools/match_win): add presets
1 parent 816c9ac commit b2ed524

2 files changed

Lines changed: 25 additions & 1 deletion

File tree

‎docs/pages/tools/match_win.html‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Match Win Calculator
33
date: "2024-11-06 21:48:00 -0700"
4-
mdate: 2025-02-06 17:56:00 -0700
4+
mdate: 2025-12-29 13:00:00 -0700
55
entry: app_tools_match_win
66
---
77
<p>

‎scripts/tools/match_win/AppToolsMatchWin.svelte‎

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,30 @@ const memo = $derived((() => {
3838
})())
3939
</script>
4040

41+
<div class="input-group d-flex mb-2" role="group">
42+
<span class="input-group-text">Presets</span>
43+
<button
44+
onclick={() => (nRaw.value = 2, leadRequiredRaw.value = 1)}
45+
class:active={nRaw.value == 2 && leadRequiredRaw.value == 1}
46+
class="flex-grow-1 btn btn-outline-secondary">Best-of-3</button>
47+
<button
48+
onclick={() => (nRaw.value = 3, leadRequiredRaw.value = 1)}
49+
class:active={nRaw.value == 3 && leadRequiredRaw.value == 1}
50+
class="flex-grow-1 btn btn-outline-secondary">Best-of-5</button>
51+
<button
52+
onclick={() => (nRaw.value = 10, leadRequiredRaw.value = 1)}
53+
class:active={nRaw.value == 10 && leadRequiredRaw.value == 1}
54+
class="flex-grow-1 btn btn-outline-secondary">Best-of-19</button>
55+
<button
56+
onclick={() => (nRaw.value = 13, leadRequiredRaw.value = 1)}
57+
class:active={nRaw.value == 13 && leadRequiredRaw.value == 1}
58+
class="flex-grow-1 btn btn-outline-secondary">Valorant Unrated</button>
59+
<button
60+
onclick={() => (nRaw.value = 13, leadRequiredRaw.value = 2, otRaw.value = 2)}
61+
class:active={nRaw.value == 13 && leadRequiredRaw.value == 2 && otRaw.value == 2}
62+
class="flex-grow-1 btn btn-outline-secondary">Valorant Competitive</button>
63+
</div>
64+
4165
<p>Minimum score to win</p>
4266
<input type="number" class="form-control" min=1 bind:value={nRaw.value}>
4367
<input type="range" class="form-range" min=1 max=32 bind:value={nRaw.value}>

0 commit comments

Comments
 (0)