Allow null-values for additional cards

When null is given, there is no card to assign

There is currently no placeholder for the missing space.
This means, if a row has no card at some column it must also have no card
at any later column.
This commit is contained in:
Lukas Fürderer 2020-08-25 18:54:15 +02:00
parent fa24646e5f
commit 89ed7a327b

View File

@ -69,8 +69,10 @@ function shuffle(a) {
function shuffle_cards(section) { function shuffle_cards(section) {
let a = []; let a = [];
for (let i=0; i<cards_content[section].length; i++) { for (let i=0; i<cards_content[section].length; i++) {
if (cards_content[section][i] != null) {
a.push(i); a.push(i);
} }
}
shuffle(a); shuffle(a);
return a; return a;
} }