jmsv / cosmic-horizon

c3's c++ game project: a text-based space adventure
https://jmsv.github.io/cosmic-horizon
MIT License
9 stars 1 forks source link
cli consolegame cpp game

Dependencies

To install all dependencies (on ubuntu), run sudo ./get_dependencies.sh from the root directory of this repository

Helpful git stuff

In Codio, before running any git commands, type cd cosmic-horizon/ to change directory to the repository directory, otherwise you'll get a 'fatal: Not a git repository' message.

To add your changes to the GitHub repo, use the above add, commit and push commands. Get the latest changes using pull.

Print colour scheme (see print.cpp)

Database methods

Database db = Database();

// How to add item to inventory:
db.add_to_inventory("Potato");

// How to check if inventory contains something:
if (db.do_i_have("Potato")) {
    print("You have a Potato.");
} else {
    print("You do not have a Potato.");
}
// In this case, 'You have a Potato.' is printed.