Skip to content

Instantly share code, notes, and snippets.

@johnX9
Created June 15, 2018 01:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save johnX9/22f8a9ae0be2473c5c16a17536e6849e to your computer and use it in GitHub Desktop.
Save johnX9/22f8a9ae0be2473c5c16a17536e6849e to your computer and use it in GitHub Desktop.
if (currentPlayer.inventory.size() > 0) {
print(" Items: ");
for (uint32_t i = 0; i < currentPlayer.inventory.size(); i++) {
item currentItem = currentPlayer.inventory.at(i);
print(currentItem.name.c_str(), " == ");
}
} else {
print(" Empty inventory");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment