Anyone familiar with spritekit? Can some one tell me how we can keep a track of user moves? And how to add an undo move feature in spritekit? Been looking all over the internet for this but no luck.
Check out gameprogrammingpatterns.com - very useful book. You need a "Command" design pattern. Basically you create an object for every move and send it to your control code. Each command can also have equivalent undo object as either field in itself, or a separate object. So this way when you want to undo you just tell your control code to execute undo on last command.