solitaire: detect a won board and finish it in one press
A drained, all-face-up board is a guaranteed clear that auto() sweeps home in a single cascade, but the only way to trigger it was double-clicking thirty cards home by hand. Add State.Won(), surface it in the view, and swap the ordinary controls for one pulsing finish button when it's true.
This commit is contained in:
@@ -1456,6 +1456,14 @@ html[data-phase="night"] {
|
||||
100% { box-shadow: 0 0 0 1.4rem rgba(242, 181, 61, 0); }
|
||||
}
|
||||
|
||||
/* The finish button on a won board breathes, so the one press left to make is
|
||||
the one the eye lands on. */
|
||||
.pete-finish { animation: pete-finish-pulse 1.6s ease-in-out infinite; }
|
||||
@keyframes pete-finish-pulse {
|
||||
0%, 100% { box-shadow: 0 0 0 0 rgba(242, 181, 61, 0.55); }
|
||||
50% { box-shadow: 0 0 0 0.9rem rgba(242, 181, 61, 0); }
|
||||
}
|
||||
|
||||
/* The rail: the house's rack, what you've banked, the meter. On a wide screen
|
||||
it's a column down the right of the felt; on a narrow one it lies down and
|
||||
sits under the board. */
|
||||
@@ -2130,7 +2138,8 @@ html[data-phase="night"] {
|
||||
.pete-tile-hit,
|
||||
.pete-meter[data-hit="1"] { animation: none; }
|
||||
.pete-nope,
|
||||
.pete-home-flash { animation: none; }
|
||||
.pete-home-flash,
|
||||
.pete-finish { animation: none; }
|
||||
.pete-card[data-held="1"] { transition: none; }
|
||||
/* The clock still drains — it is information, not decoration — but it stops
|
||||
pulsing at you, and a wrong answer stops shaking. */
|
||||
|
||||
Reference in New Issue
Block a user