tag @e remove Unused
execute as @e[tag=Board] if score Width Game < @s DistanceMid run tag @s add Unused
execute as @e[tag=Board] if score Height Game < @s DistanceMid2 run tag @s add Unused
execute as @e[tag=Unused,tag=Alive] run tag @s remove Alive
execute as @e[tag=Unused,tag=Red] run tag @s remove Red
tag @e[tag=Board] remove WillLive
tag @e[tag=Board] remove WillDie
tag @e[tag=Board] remove BecomeRed
scoreboard players set @e[tag=Board] Adjacent 0
scoreboard players set @e[tag=Board] AdjRed 0
scoreboard players set @e[tag=Board] AdjBlue 0
execute as @e[tag=Board,tag=Alive] at @s run scoreboard players add @e[tag=Board,distance=..1.5] Adjacent 1
execute as @e[tag=Board,tag=Alive,tag=Red] at @s run scoreboard players add @e[tag=Board,distance=..1.5] AdjRed 1
execute as @e[tag=Board,tag=Alive,tag=!Red] at @s run scoreboard players add @e[tag=Board,distance=..1.5] AdjBlue 1
scoreboard players remove @e[tag=Alive] Adjacent 1
scoreboard players remove @e[tag=Alive,tag=Red] AdjRed 1
scoreboard players remove @e[tag=Alive,tag=!Red] AdjBlue 1
execute as @e[tag=Board,tag=Alive] unless score @s Adjacent = 2 Integer unless score @s Adjacent = 3 Integer run tag @s add WillDie
execute as @e[tag=Board,tag=!Alive] if score @s Adjacent = 3 Integer run tag @s add WillLive
execute as @e[tag=Board,tag=WillLive] if score @s AdjRed > @s AdjBlue run tag @s add BecomeRed
scoreboard players set Time Time 0