Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Generics are dangerous

Name: Anonymous 2018-09-02 12:38

Generics are bad and complex and we should not have them.They make my head hurt. I don’t like complex. I like copying and pasting code and adjusting types. I like macro’s. Just like in 1981. You like generics? You support BUGS in CODE.

Name: Anonymous 2018-09-03 14:14

https://github.com/wesnoth/wesnoth/blob/master/src/actions/attack.cpp#L159
You're probably thinking about this?
// Compute chance to hit.
chance_to_hit = opp.defense_modifier(resources::gameboard->map().get_terrain(opp_loc)) + weapon->accuracy()
- (opp_weapon ? opp_weapon->parry() : 0);

if(chance_to_hit > 100) {
chance_to_hit = 100;
}

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List