Persistent Data in .rb
I was hesitant to develop this feature. Fundamentally, a player should be able to save a beloved game, perhaps juggle a couple of different options, and then return to them at a later time. Would this require a massive backend database? Some sort of complicated system to parse data into strings and strings back into data?
Yet after researching several options, the native Marshal file system in Ruby is incredibly friendly for developers. With only a couple lines of code, Ruby transforms a couple of objects into a hash and writes that into a .marshal file. The process is just as easy to reverse, and keeps the user interaction within the terminal.
This update also provides a menu system with options to continue playing, start a new game, save the game, load a game, or quit back to the terminal. Future updates will look at alternatives to global variables and provide user-selection of seed values.
Codebase
Marshal documentation
Benchmark data
I love seeing this progress! Such a cool project
Awesome job! Looking forward to more updates as you continue to build on this project!