This isn't an authentic recreation nor is it efficient, i just made this thing real quick. if i want i can make a more authentic thing, i just whipped this out real quick.
inspiration https://www.youtube.com/watch?v=7m38m0OFnJE things to note: in the original video, the squares only go back into their own territory when they can't touch any more empty squares in their position. once they are in their territory, they go to the closest empty square. i think that means that they also always point towards the nearest closest empty square. empty squares surrounded by a color become captured and become that color. i think that's all i'm missing to my knowledge