summaryrefslogtreecommitdiff
path: root/play.js
diff options
context:
space:
mode:
Diffstat (limited to 'play.js')
-rw-r--r--play.js20
1 files changed, 15 insertions, 5 deletions
diff --git a/play.js b/play.js
index 05e0742..da6f215 100644
--- a/play.js
+++ b/play.js
@@ -1033,32 +1033,42 @@ function on_update() {
ui.played.replaceChildren()
if (view.played) {
- for (let c of view.played)
+ for (let c of view.played) {
ui.played.appendChild(ui.cards[c])
+ ui.cards[c].classList.toggle("used", set_has(view.used, c))
+ }
}
ui.hand.replaceChildren()
if (view.hand) {
- for (let c of view.hand)
+ for (let c of view.hand) {
ui.hand.appendChild(ui.cards[c])
+ ui.cards[c].classList.remove("used")
+ }
}
ui.draw.replaceChildren()
if (view.draw) {
- for (let c of view.draw)
+ for (let c of view.draw) {
ui.draw.appendChild(ui.cards[c])
+ ui.cards[c].classList.remove("used")
+ }
}
ui.discard.replaceChildren()
if (view.discard) {
- for (let c of view.discard)
+ for (let c of view.discard) {
ui.discard.appendChild(ui.cards[c])
+ ui.cards[c].classList.remove("used")
+ }
}
ui.market.replaceChildren()
for (let c of view.market) {
- if (c > 0)
+ if (c > 0) {
ui.market.appendChild(ui.cards[c])
+ ui.cards[c].classList.remove("used")
+ }
}
for (let e of action_register)