From 02a5f418008ef11509114ae32f4a765e27067c27 Mon Sep 17 00:00:00 2001 From: efim Date: Sun, 2 Jul 2023 05:26:23 +0000 Subject: [PATCH] refactor: make choices object, move out style this should allow to write 'isBeating' function over choices. and maybe move to enums --- .../src/main/resources/templates/index.html | 6 +- .../main/scala/rockpaperscissors/Models.scala | 85 +++++++++++++------ 2 files changed, 61 insertions(+), 30 deletions(-) diff --git a/14-rock-paper-scissors/src/main/resources/templates/index.html b/14-rock-paper-scissors/src/main/resources/templates/index.html index aefb2fc..6701159 100644 --- a/14-rock-paper-scissors/src/main/resources/templates/index.html +++ b/14-rock-paper-scissors/src/main/resources/templates/index.html @@ -86,9 +86,9 @@ --translation: 50%; position: absolute; " - th:style="| --diameter: ${choiceBadgeData.c.diameter}; - --bg-dark: ${choiceBadgeData.c.bgDark}; - --bg-bright: ${choiceBadgeData.c.bgBright}; + th:style="| --diameter: ${choiceBadgeData.s.diameter}; + --bg-dark: ${choiceBadgeData.s.bgDark}; + --bg-bright: ${choiceBadgeData.s.bgBright}; ${choiceBadgeData.p.toStyle}; |" >
{ + val player = playersChoice.c + val house = houseSelectedChoice.c + false + }) + + } + } }