10
Last seen 4 years ago
Member for 4 years, 8 months, 26 days
Difficulty Normal
As stated in Mission information: You should store vampirism attribute as an integer (50 for 50%). It will be needed to make this solution evolutes to fit one of the next challenges of this saga.
More
Great solution with ‘following’ attribute! Especially, I'm pleased that I made the same approach. Maybe I'm picking on, but I'd rather initialised self.following = None, not 0. it's not a mistake, but could be confusing for some fellows. Anyway, your solution is very OOP, short, readable and pythoni
More
I am a beginer in OOP, and IMHO. :)
I see no inheritance or polymorphism hear, at least for classs methods. Classes are pretty much empty, all logics is implemented in Battle class.
I mean, my class Batlle has not changed a bit from Defender to Healer task, where I am currently at.
I guess, it's
More
Definitely, best solution, as for me! ++ from me!
Why do you pass self in Army.add_units() method?
self._troops.append(unit_type(self))
More
Why not to use method inheritance for equip_weapon instead of such conditions:
type(unit_1) is Vampire,
and so on? Classes of soldiers are all empty, even the attack method is not encapsulated in the classes. No encapsulation, no inheritance of methods. Its basically the functional programmin
More
Very slick and elegant code. I have learned something new form it. Thx. Great Job!
More
Nice code, quite the same algo that I used. But I used dict instead of a list of lists.
More