Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implemented an in-game store #49 #53

Merged
merged 5 commits into from
Oct 24, 2017
Merged

Implemented an in-game store #49 #53

merged 5 commits into from
Oct 24, 2017

Conversation

sarthi92
Copy link
Contributor

Implemented Store

Copy link
Owner

@tagniam tagniam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just some minor things I would change

{
ClearScreen();
coins = _Player->GetCoins();
cout << endl << " Jeremy's Tools Store\tPlayer: ";
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest that Player::DisplayInventory is called here instead of just printing the player's coins. This way they know what it is in their inventory when they're buying something.

_Player->AddStoreItemToInventory(ITEMTYPE::BOMB);
_Player->LoseCoins(bombCost);
}
Sleep(1000);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use SLEEP_MS instead of a magic number. Same thing for the other cases

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done all the changes suggested

cout << " 0) Exit" << endl << endl;
cout << " -------------------------------------------- " << endl << endl;
cout << " What do you want to buy today?" << endl << endl << " ";
cin >> choice;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice if choice = input(); is used instead

const unsigned short whetstoneCost = 20;

//Messages
string lowCoinsMessage = " Insufficient Coins !";
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These strings should be constant

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should i move all the const values such as Cost and Messages to common.h and common.cpp ?

@tagniam tagniam merged commit 6c449a5 into tagniam:master Oct 24, 2017
@tagniam
Copy link
Owner

tagniam commented Oct 24, 2017

Nice work @sarthi92, thank you for making the game better 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants