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:
parent
fa24646e5f
commit
89ed7a327b
4
quiz.js
4
quiz.js
@ -69,7 +69,9 @@ 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++) {
|
||||||
a.push(i);
|
if (cards_content[section][i] != null) {
|
||||||
|
a.push(i);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
shuffle(a);
|
shuffle(a);
|
||||||
return a;
|
return a;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user