Fix #10 - Allow to choose card color

This commit is contained in:
Luc Didry 2018-09-17 09:49:48 +02:00
parent ae4db29b8c
commit 33d96d90ea
No known key found for this signature in database
GPG key ID: EA868E12D0257E3C
2 changed files with 15 additions and 2 deletions

View file

@ -394,6 +394,11 @@ function createCard(id, text, x, y, rot, colour) {
}
function randomCardColour() {
var choosed = $('#choose-card-color').val();
if (choosed !== 'random') {
return choosed;
}
var colours = ['yellow', 'green', 'blue', 'white'];
var i = Math.floor(Math.random() * colours.length);