fix(14): halo should be around winning hand
This commit is contained in:
parent
59cab44920
commit
9ddd9d3943
|
@ -1082,6 +1082,12 @@ video {
|
||||||
width: 400px;
|
width: 400px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.md\:scale-150 {
|
||||||
|
--tw-scale-x: 1.5;
|
||||||
|
--tw-scale-y: 1.5;
|
||||||
|
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
||||||
|
}
|
||||||
|
|
||||||
.md\:rounded-lg {
|
.md\:rounded-lg {
|
||||||
border-radius: 0.5rem;
|
border-radius: 0.5rem;
|
||||||
}
|
}
|
||||||
|
|
|
@ -83,7 +83,7 @@
|
||||||
|
|
||||||
<section
|
<section
|
||||||
id="controls"
|
id="controls"
|
||||||
class="bg-center bg-no-repeat bg-60% bg-triangle-pattern w-[375px] h-[375px] relative"
|
class="bg-center bg-no-repeat bg-60% bg-triangle-pattern w-[375px] h-[375px] relative md:scale-150"
|
||||||
>
|
>
|
||||||
<!-- This control will be repeated 3 times, with different htmx requests -->
|
<!-- This control will be repeated 3 times, with different htmx requests -->
|
||||||
<div
|
<div
|
||||||
|
|
|
@ -56,7 +56,7 @@
|
||||||
</h2>
|
</h2>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<div id="showdown-table" th:fragment="showdown-table (showdownState)">
|
<div id="showdown-table" th:fragment="showdown-table (showdownState)" class="md:scale-150">
|
||||||
<section class="grid grid-cols-2 w-[375px] h-[300px]">
|
<section class="grid grid-cols-2 w-[375px] h-[300px]">
|
||||||
<div
|
<div
|
||||||
id="players-choice"
|
id="players-choice"
|
||||||
|
@ -70,15 +70,15 @@
|
||||||
<!-- This is end of the game animated halo -->
|
<!-- This is end of the game animated halo -->
|
||||||
<div
|
<div
|
||||||
class="absolute mt-16 bg-white rounded-full opacity-5 -translate-y-1/2 w-[150px] h-[150px]"
|
class="absolute mt-16 bg-white rounded-full opacity-5 -translate-y-1/2 w-[150px] h-[150px]"
|
||||||
th:classappend="${showdownState.gameResult.isEmpty} ? 'invisible' : 'quickly-appear'"
|
th:classappend="${showdownState.isPlayerWin} ? 'quickly-appear' : 'invisible' "
|
||||||
></div>
|
></div>
|
||||||
<div
|
<div
|
||||||
class="absolute mt-16 bg-white rounded-full opacity-5 -translate-y-1/2 w-[200px] h-[200px]"
|
class="absolute mt-16 bg-white rounded-full opacity-5 -translate-y-1/2 w-[200px] h-[200px]"
|
||||||
th:classappend="${showdownState.gameResult.isEmpty} ? 'invisible' : 'quickly-appear'"
|
th:classappend="${showdownState.isPlayerWin} ? 'quickly-appear' : 'invisible' "
|
||||||
></div>
|
></div>
|
||||||
<div
|
<div
|
||||||
class="absolute mt-16 bg-white rounded-full opacity-5 -translate-y-1/2 w-[260px] h-[260px]"
|
class="absolute mt-16 bg-white rounded-full opacity-5 -translate-y-1/2 w-[260px] h-[260px]"
|
||||||
th:classappend="${showdownState.gameResult.isEmpty} ? 'invisible' : 'quickly-appear'"
|
th:classappend="${showdownState.isPlayerWin} ? 'quickly-appear' : 'invisible' "
|
||||||
></div>
|
></div>
|
||||||
<div
|
<div
|
||||||
th:remove="all"
|
th:remove="all"
|
||||||
|
@ -123,6 +123,19 @@
|
||||||
>
|
>
|
||||||
...
|
...
|
||||||
</div>
|
</div>
|
||||||
|
<!-- This is end of the game animated halo for house choice -->
|
||||||
|
<div
|
||||||
|
class="absolute mt-16 bg-white rounded-full opacity-5 -translate-y-1/2 w-[150px] h-[150px]"
|
||||||
|
th:classappend="${showdownState.isHouseWin} ? 'quickly-appear' : 'invisible' "
|
||||||
|
></div>
|
||||||
|
<div
|
||||||
|
class="absolute mt-16 bg-white rounded-full opacity-5 -translate-y-1/2 w-[200px] h-[200px]"
|
||||||
|
th:classappend="${showdownState.isHouseWin} ? 'quickly-appear' : 'invisible' "
|
||||||
|
></div>
|
||||||
|
<div
|
||||||
|
class="absolute mt-16 bg-white rounded-full opacity-5 -translate-y-1/2 w-[260px] h-[260px]"
|
||||||
|
th:classappend="${showdownState.isHouseWin} ? 'quickly-appear' : 'invisible' "
|
||||||
|
></div>
|
||||||
<!-- This will be shown before the house made the choice, this will trigger timed request for house choice -->
|
<!-- This will be shown before the house made the choice, this will trigger timed request for house choice -->
|
||||||
<div class="w-full h-full" th:remove="all">
|
<div class="w-full h-full" th:remove="all">
|
||||||
<div
|
<div
|
||||||
|
|
|
@ -124,6 +124,8 @@ position: absolute;
|
||||||
} else "lose"
|
} else "lose"
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
def isHouseWin: Boolean = gameResult.contains("lose")
|
||||||
|
def isPlayerWin: Boolean = gameResult.contains("win")
|
||||||
def scoreChange: Int = {
|
def scoreChange: Int = {
|
||||||
houseChoice.map(houseSelectedChoice => {
|
houseChoice.map(houseSelectedChoice => {
|
||||||
val player = playersChoice.c
|
val player = playersChoice.c
|
||||||
|
|
Loading…
Reference in New Issue