Sorry about that. The tutorial is a mess as it simply saves the amount of selected stones at the end of previous step and looks for lesser number afterwards meaning if you had no selected stone it can softlock because it looks for negative amount. I did not realize that before now so I am truly sorry for that but also thanks for giving my game a try.