powergrid-comp-345 / PowerGrid

0 stars 2 forks source link

mostly a reminder to myself: fix Powerplant issue #7

Open elsa-k-donovan opened 5 years ago

elsa-k-donovan commented 5 years ago

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.

elsa-k-donovan commented 5 years ago

BUG: You can buy the same city twice

elsa-k-donovan commented 5 years ago

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!

elsa-k-donovan commented 5 years ago

*checkWallet SOLVED

denizakcal commented 5 years ago

@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.)

denizakcal commented 5 years ago

Oops; I think I found a bug. I'll deal with it soon-ish.

denizakcal commented 5 years ago

Okay, now, it should be fixed. :)

denizakcal commented 5 years ago

Let me know if there's any problem(s).

denizakcal commented 5 years ago

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).