before board
This commit is contained in:
6
game.js
6
game.js
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user