|
|
|
@ -213,6 +213,21 @@ class Board{
|
|
|
|
ctx.fillStyle = '#000';
|
|
|
|
ctx.fillStyle = '#000';
|
|
|
|
ctx.fillText(deckLength, textx, texty);
|
|
|
|
ctx.fillText(deckLength, textx, texty);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// If the item is a mana, draw the mana colour within it
|
|
|
|
|
|
|
|
// Temp solution, but works for UI and testing
|
|
|
|
|
|
|
|
if(boardElement[itemKey] == 'mana'){
|
|
|
|
|
|
|
|
// TODO: Seperate this into a 'drawMana' or something?
|
|
|
|
|
|
|
|
let manaColour = new Shape({
|
|
|
|
|
|
|
|
shape: 'circle',
|
|
|
|
|
|
|
|
//name: 'deckCountererer',
|
|
|
|
|
|
|
|
x: positionX + width/2,
|
|
|
|
|
|
|
|
y: positionY + height/2,
|
|
|
|
|
|
|
|
width: width*.75,
|
|
|
|
|
|
|
|
height: height*.75,
|
|
|
|
|
|
|
|
fillStyle: fill // Fill should be the card's main colour
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
manaColour.draw();
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
isFaceUp(itemKey){
|
|
|
|
isFaceUp(itemKey){
|
|
|
|
if(cardFace[itemKey] == 1){
|
|
|
|
if(cardFace[itemKey] == 1){
|
|
|
|
|