execute if score game movecorner matches ..-1 as @p at @s run tp ~1 ~ ~
execute if score game movecorner matches ..-1 as @p at @s run scoreboard players add game movecorner 1

execute if score game movecorner matches 1.. as @p at @s run tp ~-1 ~ ~
execute if score game movecorner matches 1.. as @p at @s run scoreboard players remove game movecorner 1

execute unless score game movecorner matches 0 run function game:moveplayer