 				background: "url(#{Plugin.resourceUri(cardimage)}) 100% 100% no-repeat"
 				backgroundSize: 'contain'
 
+		if messagetext
+			Dom.div !->
+				Dom.text messagetext
+				Dom.style
+					margin: '0 auto'
+					fontSize: '120%'
+					textAlign: 'center'
+
 		Dom.div !->
 			Dom.text cardtext
 			Dom.style

#		Server.call "addUser", userId
	playercount = Obs.create(Db.shared.get 'settings', 'playercount')
	players = JSON.parse(Db.shared.get 'settings', 'players')
	current = getUser(Db.shared.get 'turn')

	if +Plugin.userId() is +current
		Dom.div !->
			Dom.text "Your turn!"

		Dom.div !->
			Dom.style
				display: 'inline-block'
				width: '80%'
				height: '80%'
				background: "url(#{Plugin.resourceUri('back.jpg')}) 100% 100% no-repeat"
				backgroundSize: 'contain'

		Modal.show "Draw a card", !->
			Dom.style width: '80%'

					backgroundColor: '#eee'
					margin: '-12px'
				Ui.bigButton "Draw a card", !->
					next = +turn + 1
					if next >= +playercount - 1
						next = 0

					Server.call 'nextTurn', next
					Modal.remove()
	else
		if currentcard = Db.shared.get 'currentcard'
			cardrules = [
				"Rule",# 10
				"Snake eyes",# 2
				"All girls drink",# 3
				"All boys drink",# 4
				"Forbidden word",# 5
				"Give someone a drink",# 6
				"\"Juffen\"",# 7
				"Mate",# 8
				"Category",# 9
				"Rhyme",# Ace
				"Nickname",# Jack
				"Kingscup!",# King
				"Quiz master"# Queen
			]
			cardtype = Math.floor(+currentcard / 4)

			cardtext = cardrules[cardtype]
			cardimage = currentcard + '.png'

			previous = +turn - 1
			if previous < 0
				previous = +playercount - 1
			messagetext = Dom.text Plugin.userName(getUser(previous)) + " has drawn:"
		else
			cardtext = "The first card needs to be drawn"
			cardimage = 'back.jpg'
