I used a slightly different version in the 5th and final level, an ice world, of this game Pixel Toad. It’s different in the game posted to make the final level simpler. You don’t slide forward when changing directions. Though I have this version implemented in Pixel Toad my son plays on his Pygamer. It’s more challenging, but he can complete the level.