To install all dependencies (on ubuntu), run sudo ./get_dependencies.sh
from the root directory of this repository
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.
git status
- shows local changes, what files are trackedgit add -A
- adds all new local changesgit commit -a -m "Short description"
- wraps changes in a commit (-a
means all changes,-m ""
is the commit message)git push origin master
- pushes local commits to githubgit pull origin master
- pulls from github repositorygit reset --hard
- reset local repository to HEAD version
To add your changes to the GitHub repo, use the above add
, commit
and push
commands. Get the latest changes using pull
.
- green: good stuff
- red: bad stuff
- cyan: titles
- magenta: neutral story text
- blue: ask for user input
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.