aelmosalamy / ascii-combat

A simple CLI text adventure game, created for learning purposes, feel free to contribute.
MIT License
69 stars 17 forks source link

Converting to YAML for storing data #9

Open aelmosalamy opened 5 years ago

aelmosalamy commented 5 years ago

The file ac_dicts.py is getting bigger and is almost getting unreadable, 350+ lines with just 8 items and 5 rooms, so I was thinking about storing and converting all the data into .YAML files using ruamel.yaml and then whenever I am adding new items I add it to the YAML files, It will be more efficient and it will make ASCII Combat's files cleaner and more organized, ac_dicts.py will contain extractor functions and some random utility functions with the main purpose of reading the YAML data

EDIT: I am currently doing some research on either I should use ruamel.yaml or use Python's pickle, currently I give 1 point to YAML for human-readability

codeswhite commented 4 years ago

Check out TOML, PIP itself recently started to use it!