scoreboard players set Thinking Game 1
scoreboard players add Iteration Game 1
function main:savestate
function main:count
scoreboard players operation dtt Temp = Iteration Game
scoreboard players operation dtt Temp *= 100 Integer
scoreboard players operation dtt Temp /= Current DiffThinkTime
execute if score dtt Temp < 60 Integer as @e[tag=!Red,tag=Alive,tag=!AICalculated,limit=1,sort=random] run function ai:getscoremax
execute unless score dtt Temp < 60 Integer as @e[tag=Alive,tag=!AICalculated,limit=1,sort=random] run function ai:getscoremax
execute if score RED Game > 1 Integer as @e[tag=SummonEligible,tag=!AICalculated,limit=1,sort=random] run function ai:getscoremaxsummon
function main:loadstate
function ai:getminscore2
scoreboard players set RenderTimer Timer -160
scoreboard players set Thinking Game 0
tag @e remove Calc
tag @e remove Calc2
tag @e remove CalcSummon