Place SVG in card definitions and load from those

This commit is contained in:
Stephen Jianu 2022-09-21 20:15:40 -05:00
commit ff787f7e64
5 changed files with 63 additions and 61 deletions

View file

@ -1,7 +1,7 @@
'use strict'
function Card_Monster (sym, value, type, name = 'Unknown') {
Card.call(this, sym, value, type, name)
function Card_Monster (sym, value, type, name = 'Unknown', svg = '') {
Card.call(this, sym, value, type, name, svg)
this.touch = function () {
if (this.is_flipped) { console.log('Card is already flipped'); return }