Browse files

adding golem information to readme

  • Loading branch information...
1 parent cf71a69 commit 2dd76f662b158d04f19351856c49ef0061b1b793 @ryanb committed Jun 7, 2010
Showing with 14 additions and 0 deletions.
  1. +14 −0 README.rdoc
@@ -136,12 +136,26 @@ Whenever you sense an area, often one or multiple spaces (in an array) will be r
Returns true if this space contains a bomb which will explode in time.
+ space.golem?
+ Returns true if a golem is occupying this space.
You will often call these methods directly after a sense. For example, the "feel" sense returns one space. You can call "captive?" on this to determine if a captive is in front of you.
+== Golem
+Along your journey you may discover the ability to create a golem. This is a separate unit which you also control. The turn handling is done through a block. Here is an example.
+ warrior.form! do |golem|
+ golem.attack! if golem.feel.enemy?
+ end
+Complex logic can be placed in this block just like in the player turn method. You may want to move the logic into its own class or create multiple classes for different types of golems. You can create multiple golems in a level, but each one will take half of the warrior's health.
== Epic Mode
Once you reach the top of the tower, you will enter epic mode. When running rubywarrior again it will run your current player.rb through all levels in the tower without stopping.

0 comments on commit 2dd76f6

Please sign in to comment.