I have no idea why it automatically makes the last move, and I don't know how to fix it, nor do I want to. This is the best I could make.
Also testing it
How do you turn it into a puzzle?
theme has a puzzle option