scoreboard players set global moveCooldown 6
scoreboard players set @s faceDirection 5
scoreboard players set @s lastDirection 5
scoreboard players set @a[limit=1,tag=self101] faceDirection 5

scoreboard players set @s moveCommit 9
scoreboard players operation @s moveCommitTime = global MOVECOMMITTIME

#count every move performed for end ranking
function bd:game/track_game_moves

#no clipping with slime blocks please
execute if block ~ ~ ~ air run setblock ~ ~ ~ barrier

#breakables?
execute unless entity @s[tag=arm_disconnected] positioned ~-1 ~ ~-1 if block ~ ~ ~ #bd:breakable run setblock ~ ~ ~ air destroy
execute unless entity @s[tag=arm_disconnected] positioned ~ ~ ~-1 if block ~ ~ ~ #bd:breakable run setblock ~ ~ ~ air destroy

#pushables?
execute unless entity @s[tag=arm_disconnected] positioned ~-1 ~ ~-1 if block ~ ~ ~ #bd:pushable run function bd:movement/object/block_move_5
execute unless entity @s[tag=arm_disconnected] positioned ~-1 ~ ~-1 if block ~ ~ ~ #bd:pushable_one_only run function bd:movement/object/block_move_5
execute unless entity @s[tag=arm_disconnected] positioned ~ ~ ~-1 if block ~ ~ ~ #bd:pushable run function bd:movement/object/block_move_7
execute unless entity @s[tag=arm_disconnected] positioned ~ ~ ~-1 if block ~ ~ ~ #bd:pushable_one_only run function bd:movement/object/block_move_7

tag @s add moved

scoreboard players set global recordNextReset 1