#change turn score
execute @e[tag=dummy,scores={playercount=2,turn=1}] ~ ~ ~ scoreboard players set @s turn 12
execute @e[tag=dummy,scores={playercount=2,turn=2}] ~ ~ ~ scoreboard players set @s turn 11


execute @e[tag=dummy,scores={playercount=3,turn=1}] ~ ~ ~ scoreboard players set @s turn 12
execute @e[tag=dummy,scores={playercount=3,turn=2}] ~ ~ ~ scoreboard players set @s turn 13
execute @e[tag=dummy,scores={playercount=3,turn=3}] ~ ~ ~ scoreboard players set @s turn 11


execute @e[tag=dummy,scores={playercount=4,turn=1}] ~ ~ ~ scoreboard players set @s turn 14
execute @e[tag=dummy,scores={playercount=4,turn=4}] ~ ~ ~ scoreboard players set @s turn 12
execute @e[tag=dummy,scores={playercount=4,turn=2}] ~ ~ ~ scoreboard players set @s turn 13
execute @e[tag=dummy,scores={playercount=4,turn=3}] ~ ~ ~ scoreboard players set @s turn 11






#remove 10
scoreboard players remove @e[tag=dummy] turn 10






#check if winner
scoreboard players reset * cardcount
scoreboard players set @a[tag=turn] cardcount 0
execute @a[tag=turn,scores={player_id=1}] ~ ~ ~ execute @e[type=cero:card,tag=player1] ~ ~ ~ scoreboard players add @a[tag=turn] cardcount 1
execute @a[tag=turn,scores={player_id=2}] ~ ~ ~ execute @e[type=cero:card,tag=player2] ~ ~ ~ scoreboard players add @a[tag=turn] cardcount 1
execute @a[tag=turn,scores={player_id=3}] ~ ~ ~ execute @e[type=cero:card,tag=player3] ~ ~ ~ scoreboard players add @a[tag=turn] cardcount 1
execute @a[tag=turn,scores={player_id=4}] ~ ~ ~ execute @e[type=cero:card,tag=player4] ~ ~ ~ scoreboard players add @a[tag=turn] cardcount 1
tag * remove winner
tag @a[tag=turn,scores={cardcount=0}] add winner 

