Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

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

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

auno opened this issue Jul 29, 2013 · 0 comments

Comments

@auno
Copy link

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant