I need help with YAML and creating a save function for my rock paper scissors game

How come the save function for my rock paper scissors game is not working, please help link attached? Heads up, this is with the Ruby Language, I understand not everyone may be familiar with it, but whoever is or can assist I’d be deeply greatful. I’ve been banging my head against this code for two days now…

Rock Paper Scissors

1 Like

Hey, I don’t know ruby at all but since this post is over 3 days old with no replies I tried the game out. And it seems to be saving my game, here is a picture with what I see on the screen with the link you provided.
Don’t know if it helps or not but I reply anyway.

I’m not sure if you know this but when I hit “b” and save the game it counts as a turn(“game”) so it turns out that I have played 2 games when actually playing 1 and then saving.

Hey Max, the game does not return the save data when you exit the terminal and run it again. I have, however managed to sort it out though. Due to needing to use instance variables as the data that needed saving and having them saved in a file and loaded again just before calling the game loop.

1 Like