Add rubywarrior tutorial
This commit is contained in:
parent
95efdb7303
commit
4ec0e54082
|
@ -0,0 +1 @@
|
|||
RubyWarrior
|
|
@ -0,0 +1,8 @@
|
|||
BAhvOhlSdWJ5V2Fycmlvcjo6UHJvZmlsZQ86EEB0b3dlcl9wYXRoSSIBfS91
|
||||
c3IvbG9jYWwvbGliL3J1YnkvZ2Vtcy8yLjIvZ2Vtcy9ydWJ5d2Fycmlvci0w
|
||||
LjEuMy90b3dlcnMvdXNyL2xvY2FsL2xpYi9ydWJ5L2dlbXMvMi4yL2dlbXMv
|
||||
cnVieXdhcnJpb3ItMC4xLjMvdG93ZXJzL2JlZ2lubmVyBjoGRUY6EkB3YXJy
|
||||
aW9yX25hbWVJIghUaW0GOwdUOgtAc2NvcmVpADoYQGN1cnJlbnRfZXBpY19z
|
||||
Y29yZWkAOhlAY3VycmVudF9lcGljX2dyYWRlc3sAOhBAZXBpY19zY29yZWkA
|
||||
OhNAYXZlcmFnZV9ncmFkZTA6D0BhYmlsaXRpZXNbADoSQGxldmVsX251bWJl
|
||||
cmkGOhdAbGFzdF9sZXZlbF9udW1iZXIw
|
|
@ -0,0 +1,21 @@
|
|||
Level 1
|
||||
|
||||
You see before yourself a long hallway with stairs at the end. There is nothing in the way.
|
||||
|
||||
Tip: Call warrior.walk! to walk forward in the Player 'play_turn' method.
|
||||
|
||||
--------
|
||||
|@ >|
|
||||
--------
|
||||
|
||||
> = Stairs
|
||||
@ = Tim (20 HP)
|
||||
|
||||
|
||||
Warrior Abilities:
|
||||
|
||||
warrior.walk!
|
||||
Move in the given direction (forward by default).
|
||||
|
||||
|
||||
When you're done editing player.rb, run the rubywarrior command again.
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="RUBY_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$" />
|
||||
<orderEntry type="jdk" jdkName="ruby-2.2.5-p319" jdkType="RUBY_SDK" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
|
@ -0,0 +1,5 @@
|
|||
class Player
|
||||
def play_turn(warrior)
|
||||
warrior.walk!
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue