Conversation
|
If there are no issues with this PR, could you accept it quickly for now so that I can submit another that replace calls to |
|
Just as a heads up, you are free to submit multiple pull requests at a time, that's totally fine. Also, don't replace RandomInt with RandomEvent - RandomEvent is for weighted random selections, while RandomInt is for uniformly distributed random integers, they serve completely different purposes. |
|
If you mean you'd like to replace all the |
|
Yep, I'll do that across the project but was hoping that you review this first as this involves a lot of changes and I don't want to create conflicts between this and future PR |
tagniam
left a comment
There was a problem hiding this comment.
Needs changes before merging, but marking this as hacktoberfest-accepted to count for Hacktoberfest.
include/Enemy.h
Outdated
| void DisplayHUD(); | ||
|
|
||
| std::vector<int> GetDrops(); | ||
| std::vector< std::pair<std::string, int> > GetDrops(); |
There was a problem hiding this comment.
Please use ITEMTYPE instead of strings
include/Gambling.h
Outdated
| void GenerateValues(); | ||
| int ReturnShakenDie(); | ||
| char ReturnItem(); | ||
| std::string ReturnItem(); |
include/Gambling.h
Outdated
| // 2 -> Potions | ||
| // 3 -> Whetstones | ||
| int Item; | ||
| std::string Item; |
include/Player.h
Outdated
| int Action(); | ||
| void UseItem(); | ||
| void AddToInventory(std::vector<int>); | ||
| void AddToInventory(std::pair<std::string, int>); |
|
Switched to ITEMTYPE wherever applicable |
|
Could you review this please? |
Solves #133
This performs the refactoring of the function and other files that interact with said function but I'd recommend further work to restructure the code logic in light of changes such #140