A small project to calculate the average contents of default MTG Set and Draft Booster Boxes. The results are shown here.
- Install Ruby
- Install the Bundler Gem
gem install bundler
- Clone the repository
git clone https://github.com/Lisstem/whats-in-a-box.git
- Move into the directory and install the required gems
cd whats-in-a-box && bundle install
First you need to compile the booster data by running
ruby compile_template booster.yaml.erb
After this you can compile the overview
ruby compile_template boxes.md.erb booster.yaml
To load the booster data you can use the load_file() method.
require_relative 'booster_data'
boxes = BoosterData.load_file('booster.yaml')
puts boxes.inspect
This loads the data (and prints it).
You can create your own boosters following the pattern in the compiled booster.yaml. You can of course also write a template and compile it using the template compiler. The same goes for the overviews just create a template and run it with the compiler and your booster data.