When you restart it saves everithing, but the apples disappear, so i suggest adding a feature that checks if there are enough apples when the games starts (so if the apples that should be there are 3 and there are not 3 then it spawns more) so you dont softlock if you restart at that point.