You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
cardGame/public/js/global.js

23 lines
693 B
JavaScript

const cardWidth = 80;
const cardHeight = 120;
const cardArt = new Image();
const cardBackArt = new Image();
const COLOUR = {
'white':{'id': 1, 'name':'White','colour':'#EEE'},
'blue':{'id':2, 'name':'Blue','colour':'#0033EE'},
'red':{'id':3, 'name':'Red','colour':'#ED344A'},
};
// To disable drawing each time something changes
let drawEachEvent = true; // For disabling draw each time and only occuring where I want to test
let yourPlayerId = 0; // To compare click events of your/opponents cards
let viewingPlayerId = 0; // To show the board from your/opponent/teammates perspective, etc. without play permission
const maxHandSize = 4;
const maxBoardSize = 3;
const maxShield = 2;