Turn icon indicating copy to clipboard operation
Turn copied to clipboard

Refactor Player::AddToInventory

Open tagniam opened this issue 4 years ago • 11 comments

Current, Player::AddToInventory(vector<int> drops) adds items to the player's inventory by checking drops[0] for the number of arrows to add, drops[1] for bombs, drops[2] for potions, etc.

We'd like to refactor this such that the method takes a vector of std::pair<ITEMTYPE, int>, where the first element in the pair is the type of the item to add and the second element in the pair is the amount to add.

tagniam avatar Oct 25 '20 00:10 tagniam

I'd like to work on this.

ywbtan avatar Oct 25 '20 08:10 ywbtan

Please assign this to me

saurabh786iit avatar Oct 25 '20 10:10 saurabh786iit

I would like to work on this. I would like to know whether you have individual struct types for each of these or you want to be preprocessing strings. Either way, it is doable.

SudarshanHV avatar Oct 25 '20 13:10 SudarshanHV

please assign this to me.

nikitajuneja1 avatar Oct 25 '20 22:10 nikitajuneja1

please assign this to me.

jvishad avatar Oct 26 '20 11:10 jvishad

please assign this to me

verma-shivani avatar Oct 26 '20 16:10 verma-shivani

hi tagniam i can't find build inside Turn folder neither in the repo nor after cloning...please help how to run the game so that i can understand the code in better way and make contributions

pallavi-bits avatar Oct 28 '20 17:10 pallavi-bits

@pallavi-bits To run the game, after cloning the repo, follow the build instructions given in the README.md. That will create a build folder in which you'll find Turn.exe

DJ73 avatar Oct 28 '20 18:10 DJ73

I did but got this error-"CMake Error: The source directory "/home/pallavi/Turn/build" does not exist. Specify --help for usage, or press the help button on the CMake GUI."

pallavi-bits avatar Oct 29 '20 00:10 pallavi-bits

@pallavi-bits did you get that message after running cmake -S . -B build? if so, try updating your version of cmake?

tagniam avatar Oct 29 '20 00:10 tagniam

Thanks @tagniam yes the issue was of outdated cmake..now its working good thanks

pallavi-bits avatar Oct 30 '20 12:10 pallavi-bits