These are chat archives for olistic/warriorjs

26th
Apr 2016
Rodrigo Espinosa
@RodrigoEspinosa
Apr 26 2016 13:16

Hey @kodifiera, I checked your code and looks like the fallback for the perform function (https://gist.github.com/kodifiera/8d6278f521941dcf69407027d8b671ee#file-player-js-L21) is always false when it should be performed.

Let's say your warrior can perform an attack and !takesDamage(warrior.health()) === true.

value of _performedAction
false _performedAction = perform(attackIfPossible, _performedAction);
true _performedAction = perform(rest, _performedAction);
false _performedAction = perform(walk, _performedAction);
true