+ 8
[FINE TUNING CODE] Advices for code
i have a code here : https://code.sololearn.com/cBHuMXT55e1l/?ref=app i want a solution starting from the while loop i want to simplify it it looks a bit messy i want to attack but leave when either life becomes 0 i want the code a bit cleaner
6 Respuestas
+ 10
One thing you could do is move the defend call within the attack method, that would perhaps clarify the flow a little bit in the main loop.
Along those same lines, having a method of isAlive() to encapsulate the comparisons is another thought.
I like where you are going with this, keep up the good work!
+ 9
Woo! As for a weapon... how about a kukri?
+ 3
hum an isAlive sounds good
will notify when implemented
P.s. Tell me your fav weapon japanese or idk
+ 3
added an isAlive and an isDead method !
+ 2
check out last vers
0
kaliedoscopic kukri added. . .
will add characters soon