blackjack logic written in vue
https://luna-development.net/blackjack/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
436 B
20 lines
436 B
|
6 years ago
|
class Card {
|
||
|
|
color;
|
||
|
|
symbol;
|
||
|
|
points;
|
||
|
|
ace = false;
|
||
|
|
assetUrl;
|
||
|
|
|
||
|
|
constructor(color, symbol, points, ace, assetBaseUrl = 'img/') {
|
||
|
|
this.color = color;
|
||
|
|
this.symbol = symbol;
|
||
|
|
this.points = points;
|
||
|
|
this.ace = ace;
|
||
|
|
this.assetUrl = this.createAssetPath(assetBaseUrl);
|
||
|
|
}
|
||
|
|
|
||
|
|
createAssetPath(assetBaseUrl) {
|
||
|
|
return assetBaseUrl + this.color + this.symbol + '.png'
|
||
|
|
}
|
||
|
|
}
|