before board

This commit is contained in:
Yurun Chen
2024-09-20 12:31:43 +10:00
parent b8ef7647b1
commit 4b174b3c36

View File

@@ -145,6 +145,7 @@ class Element{
}
}
//background, note it is as an element, not a view
class Background extends Element {
#dx
@@ -203,8 +204,9 @@ class CardView extends Element {
super(x,y);
this.#revealed = revealed;
this.#img = new Image();
this.card = card;
if (revealed) {
this.#img.src = "cards/"+this.#cur_card.getRank()+Array.from(this.#cur_card.getSuit())[0]+".png";
this.#img.src = "cards/"+this.card.getRank()+Array.from(this.card.getSuit())[0]+".png";
} else {
this.#img.src = "cards/cardBackRed.png";
}
@@ -233,6 +235,8 @@ class StockView extends StackView{
this.#stack = stack;
}
on_empty() {
}
}
//view for the waste stack