Warrior jumps to other end while behaving as if still at first end #73

Open
auno opened this Issue Jul 29, 2013 · 0 comments

Comments

Projects
None yet
1 participant

auno commented Jul 29, 2013

In level 7, the following code will cause the warrior to seemingly jump to the other end of the level, while still taking damage and attacking as if it's still back at the first end.

class Player
  def play_turn(warrior)
    @counter ||= 0

    case @counter
    when 0
      warrior.pivot! :backward
    when 1
      warrior.pivot! :forward
    when 2
      warrior.walk!
    else
      warrior.attack!
    end

    @counter += 1
  end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment