 	teamMax = getFirstTeam()
 	newLead = false;
 	newLead = teamMax isnt Db.shared.peek('game', 'firstTeam')
-	
+
 	log "[checkNewLead()] newLead: " + newLead + " "
 
 	# create score event

	current = Db.shared.peek('gameNumber')
	Db.backend.set 'history', current,'game', Db.shared.peek('game')
	Db.backend.set 'history', current, 'gameState', Db.shared.peek('gameState')


		
		# End game and activate end game screen
		Db.shared.set 'gameState', 2
		log "[endGame()] The game ended! gameState: " + Db.shared.peek('gameState') + " args: " + args + " winningTeam: " + winningTeam + " Db: " + Db.shared.peek('game', 'firstTeam')
		# Event
		addEvent {
			timestamp: new Date()/1000
			type: "end"
