hanyuone / Ways-to-NOT-make-money

A basic Python (2.x/3.x) incremental game.
8 stars 3 forks source link

"GameState" class length can be reduced by ~250 lines #80

Closed ghost closed 8 years ago

ghost commented 8 years ago
Method Equivalent and shorter code
gamestate.get_autoclick() gamestate.autoclick
gamestate.set_autoclick(amount) gamestate.autoclick = amount
gamestate.inc_autoclick(amount) gamestate.autoclick += amount
gamestate.get_autoclick2() gamestate.autoclick2
gamestate.inc_autoclick2(amount=amount) gamestate.autoclick2 += amount
gamestate.get_autoprice() gamestate.autoprice
gamestate.set_autoprice(amount) gamestate.autoprice = amount

There are much, much more but I didn't feel like including them. So could we get rid of the methods?

hanyuone commented 8 years ago

Probably, yeah. I'll try them out.

ghost commented 8 years ago

What's the point of the class anyways if its just a bunch of getter and setter methods???

hanyuone commented 8 years ago

LOL, yeah. It takes so long to get rid of the things, though...