Fixed 2 bugs: 1. Object updating algo would skip updating the objects after those that are deleted 2. Fixed direction setting logic so the player cannot immediately turn back to their tail and lose