 
 	r = Math.floor(Math.random()*deck.length)
 	cardId = deck[r]
-	card = questionCards[cardId] # Black.cards[cardId]
+	card = Black.cards[cardId]
 
 	deck.splice(r, 1)
 	Db.shared.set 'questiondeck', deck


	r = Math.floor(Math.random()*deck.length)
	cardId = deck[r]
	card = answerCards[cardId] # White.cards[cardId]

	deck.splice(r, 1)
	Db.shared.set 'answerdeck', deck


exports.startgame = !->
	Timer.cancel()
	Db.shared.set 'questiondeck', [0..Black.cards.length - 1]
	Db.shared.set 'answerdeck', [0..White.cards.length - 1]
	Db.shared.set 'round', 0
	Db.shared.set 'score', {}
	Db.shared.set 'rounds', {}
	Db.shared.set 'paused', false
 
	# can be used to add cards during a game with an upgrade
	Db.shared.set 'questiondecksize', Black.cards.length
	Db.shared.set 'answerdecksize', White.cards.length

	for uid in Plugin.userIds()
		Db.personal(uid).set 'playedcards', ''
