mspraggs / potentia

Southampton Game Jam 2015
0 stars 0 forks source link

Refactor Player::updateSprite #59

Closed mspraggs closed 9 years ago

mspraggs commented 9 years ago

There's a lot of branching going on here, and I don't know whether it'd be possible to reorder the instructions to reduce the number of if statements. Reducing the number of if statements would potentially make the code clearer.

Addresses #6

mspraggs commented 9 years ago

I've refactored this a bit. There is still a bit of branching, but I can't see a way around this without changing how sprites work, which just isn't worth it. Hence I'll close this.