https://github.com/codegoalie/rubywarrior-intermediate
My RubyWarrior Intermediate code
https://github.com/codegoalie/rubywarrior-intermediate
Last synced: 11 months ago
JSON representation
My RubyWarrior Intermediate code
- Host: GitHub
- URL: https://github.com/codegoalie/rubywarrior-intermediate
- Owner: codegoalie
- Created: 2011-12-28T19:17:27.000Z (about 14 years ago)
- Default Branch: master
- Last Pushed: 2013-04-29T04:00:54.000Z (almost 13 years ago)
- Last Synced: 2025-02-14T05:43:50.661Z (about 1 year ago)
- Language: Ruby
- Homepage:
- Size: 97.7 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README
Awesome Lists containing this project
README
Level 5
You can feel the stairs right next to you, but are you sure you want to go up them right away?
Tip: You'll get more points for clearing the level first. Use warrior.feel.stairs? and warrior.feel.empty? to determine where to go.
-----
| S|
|@> SC|
-----
> = Stairs
@ = Hans (20 HP)
S = Thick Sludge (24 HP)
C = Captive (1 HP)
Warrior Abilities:
warrior.listen
Returns an array of all spaces which have units in them.
warrior.direction_of
Pass a Space as an argument, and the direction (:left, :right, :forward, :backward) to that space will be returned.
warrior.rescue!
Rescue a captive from his chains (earning 20 points) in given direction (forward by default).
warrior.bind!
Binds a unit in given direction to keep him from moving (forward by default).
warrior.attack!
Attacks a unit in given direction (forward by default).
warrior.health
Returns an integer representing your health.
warrior.rest!
Gain 10% of max health back, but do nothing more.
warrior.walk!
Move in the given direction (forward by default).
warrior.feel
Returns a Space for the given direction (forward by default).
warrior.direction_of_stairs
Returns the direction (:left, :right, :forward, :backward) the stairs are from your location.
When you're done editing player.rb, run the rubywarrior command again.