Open elsa-k-donovan opened 5 years ago
BUG: You can buy the same city twice
Need to check wallet before buying City (like in buyingresources) It would be Clean and Nice to have AvailableCities in GraphBuilder be affected and not include a city that was just bought!
*checkWallet SOLVED
@elsa-k-donovan, If you want an answer from someone, be sure to include whom you want feedback from by assigning assignees (top-right in the non-mobile website version). (I, for one, don't get notifications if you don't.)
It would be Clean and Nice to have AvailableCities in GraphBuilder be affected and not include a city that was just bought!
I just added a getAvailableCities() in GraphBuilder in my branch (asg3part3) (and its output changes as cities are purchased). (Let me know if that's what you wanted or not.)
Oops; I think I found a bug. I'll deal with it soon-ish.
Okay, now, it should be fixed. :)
Let me know if there's any problem(s).
Actually, I'm not sure if comparing cities by city number was reliable, so I changed it to check by city name (with the equalsIgnoreCase function I made in HelperFunctions.cpp).
For right now theres a glitch where if a player has a powerplant that can take a resource, that resource can be added to the player's other powerplant, even if that one doesnt need it.... need to add a method to fix it. for now, im fixing the building cities portion but will go back to this.