From 07344ef95219aa44faf354516ec71b9058733372 Mon Sep 17 00:00:00 2001 From: Dan Cigrang Date: Mon, 8 Jan 2024 19:37:30 -0600 Subject: [PATCH] Refactor oops --- src/components/Calculator.svelte | 27 +++------------------------ src/components/Results.svelte | 28 ++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 24 deletions(-) create mode 100644 src/components/Results.svelte diff --git a/src/components/Calculator.svelte b/src/components/Calculator.svelte index db37fca..9e283e2 100644 --- a/src/components/Calculator.svelte +++ b/src/components/Calculator.svelte @@ -1,4 +1,6 @@ + +
+

Total Cards: {deck.format}

+

Total Non-Land Cards: {deck.cards}

+

Total Mana: {deck.total()}

+ +

{deck.white.ratio}-{deck.white.ratio + 1} Plains

+ + {#if deck.blue.ratio} +

{deck.blue.ratio}-{deck.blue.ratio + 1} Islands

+ {/if} + {#if deck.black.ratio} +

+ {deck.black.ratio}-{deck.black.ratio + 1} Swamps +

+ {/if} + {#if deck.red.ratio} +

{deck.red.ratio}-{deck.red.ratio + 1} Mountains

+ {/if} + {#if deck.green.ratio} +

+ {deck.green.ratio}-{deck.green.ratio + 1} Forests +

+ {/if} +
\ No newline at end of file