Get card data from server and display it

This commit is contained in:
2021-06-08 17:33:59 +02:00
parent d867586a71
commit f469259d36
5 changed files with 42 additions and 38 deletions

View File

@@ -98,7 +98,7 @@ function generate_log_message(room, user, type, message) {
function getRandomCard(difficulty) {
let filtered_cards = cards.filter(card => {
return card.diffuculty === difficulty;
return card.difficulty === difficulty;
});
return shuffleAnswers(filtered_cards[Math.floor(Math.random() * filtered_cards.length)]);