pixelsoccupied / 345_California

Popular board game "PANDEMIC" done in C++.
0 stars 1 forks source link

Player loses its RoleCard value #118

Closed pixelsoccupied closed 7 years ago

pixelsoccupied commented 7 years ago

By the time the player reaches - bool PlayerCardsOkay::onMouseDown(std::string button, int x, int y) - in Button.cpp it loses its roleCardVal(random/hardcoded). Only workaround for now, initialize RoleCard inside the PlayerCardsOkay(Not the most elegant solution since we will the roleVale to determine the color of the pawn)

Can some somebody debug and confirm if having the same issue? Put the break point intside PlayerCardsOkay right below "int roleCardIndex = player.getRoleCard()->getRoleCardVal();" and see if it matches with one initialized at Board.cpp (start of a new game)

pixelsoccupied commented 7 years ago

@MatthewChrobak any solution for this?