rubywarrior 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (57) hide show
  1. data/CHANGELOG.rdoc +11 -0
  2. data/Gemfile +8 -0
  3. data/Gemfile.lock +36 -0
  4. data/Rakefile +4 -9
  5. data/features/step_definitions/interaction_steps.rb +5 -5
  6. data/features/support/env.rb +1 -1
  7. data/lib/ruby_warrior/game.rb +1 -1
  8. data/lib/ruby_warrior/level.rb +5 -1
  9. data/lib/ruby_warrior/player_generator.rb +2 -2
  10. data/lib/ruby_warrior/profile.rb +1 -1
  11. data/lib/ruby_warrior/tower.rb +1 -1
  12. data/spec/ruby_warrior/abilities/attack_spec.rb +1 -1
  13. data/spec/ruby_warrior/abilities/base_spec.rb +1 -1
  14. data/spec/ruby_warrior/abilities/bind_spec.rb +1 -1
  15. data/spec/ruby_warrior/abilities/direction_of_spec.rb +1 -1
  16. data/spec/ruby_warrior/abilities/direction_of_stairs_spec.rb +1 -1
  17. data/spec/ruby_warrior/abilities/distance_of_spec.rb +1 -1
  18. data/spec/ruby_warrior/abilities/explode_spec.rb +1 -1
  19. data/spec/ruby_warrior/abilities/feel_spec.rb +1 -1
  20. data/spec/ruby_warrior/abilities/form_spec.rb +1 -1
  21. data/spec/ruby_warrior/abilities/health_spec.rb +1 -1
  22. data/spec/ruby_warrior/abilities/listen_spec.rb +1 -1
  23. data/spec/ruby_warrior/abilities/look_spec.rb +1 -1
  24. data/spec/ruby_warrior/abilities/pivot_spec.rb +1 -1
  25. data/spec/ruby_warrior/abilities/rescue_spec.rb +1 -1
  26. data/spec/ruby_warrior/abilities/rest_spec.rb +1 -1
  27. data/spec/ruby_warrior/abilities/shoot_spec.rb +1 -1
  28. data/spec/ruby_warrior/abilities/throw_spec.rb +1 -1
  29. data/spec/ruby_warrior/abilities/walk_spec.rb +1 -1
  30. data/spec/ruby_warrior/core_additions_spec.rb +1 -1
  31. data/spec/ruby_warrior/floor_spec.rb +1 -1
  32. data/spec/ruby_warrior/game_spec.rb +2 -2
  33. data/spec/ruby_warrior/level_loader_spec.rb +1 -1
  34. data/spec/ruby_warrior/level_spec.rb +2 -2
  35. data/spec/ruby_warrior/player_generator_spec.rb +2 -2
  36. data/spec/ruby_warrior/position_spec.rb +1 -1
  37. data/spec/ruby_warrior/profile_spec.rb +2 -2
  38. data/spec/ruby_warrior/space_spec.rb +1 -1
  39. data/spec/ruby_warrior/tower_spec.rb +1 -1
  40. data/spec/ruby_warrior/turn_spec.rb +1 -1
  41. data/spec/ruby_warrior/ui_spec.rb +1 -1
  42. data/spec/ruby_warrior/units/archer_spec.rb +1 -1
  43. data/spec/ruby_warrior/units/base_spec.rb +1 -1
  44. data/spec/ruby_warrior/units/captive_spec.rb +1 -1
  45. data/spec/ruby_warrior/units/golem_spec.rb +1 -1
  46. data/spec/ruby_warrior/units/sludge_spec.rb +1 -1
  47. data/spec/ruby_warrior/units/thick_sludge_spec.rb +1 -1
  48. data/spec/ruby_warrior/units/warrior_spec.rb +1 -1
  49. data/spec/ruby_warrior/units/wizard_spec.rb +1 -1
  50. data/spec/spec_helper.rb +2 -2
  51. data/towers/beginner/level_002.rb +1 -1
  52. data/towers/beginner/level_003.rb +1 -1
  53. data/towers/beginner/level_005.rb +2 -2
  54. data/towers/beginner/level_006.rb +2 -2
  55. data/towers/intermediate/level_002.rb +1 -1
  56. data/towers/intermediate/level_003.rb +2 -2
  57. metadata +25 -44
@@ -1,3 +1,14 @@
1
+ 0.1.3 (April 28, 2012)
2
+
3
+ * Making specs pass with latest RSpec.
4
+
5
+ * Lowering ace score for Beginner Level 6.
6
+
7
+ * Store relative tower paths in Profile so files can be moved.
8
+
9
+ * Other minor bug fixes (see commit history for details)
10
+
11
+
1
12
  0.1.2 (September 23, 2010)
2
13
 
3
14
  * Adding intermediate level 9 with distance_of ability
data/Gemfile ADDED
@@ -0,0 +1,8 @@
1
+ source :rubygems
2
+
3
+ group :test do
4
+ gem 'rake'
5
+ gem 'rspec', '~> 2.8.0'
6
+ gem 'cucumber'
7
+ gem 'mocha'
8
+ end
@@ -0,0 +1,36 @@
1
+ GEM
2
+ remote: http://rubygems.org/
3
+ specs:
4
+ builder (3.0.0)
5
+ cucumber (1.1.9)
6
+ builder (>= 2.1.2)
7
+ diff-lcs (>= 1.1.2)
8
+ gherkin (~> 2.9.0)
9
+ json (>= 1.4.6)
10
+ term-ansicolor (>= 1.0.6)
11
+ diff-lcs (1.1.3)
12
+ gherkin (2.9.3)
13
+ json (>= 1.4.6)
14
+ json (1.7.0)
15
+ metaclass (0.0.1)
16
+ mocha (0.11.3)
17
+ metaclass (~> 0.0.1)
18
+ rake (0.9.2.2)
19
+ rspec (2.8.0)
20
+ rspec-core (~> 2.8.0)
21
+ rspec-expectations (~> 2.8.0)
22
+ rspec-mocks (~> 2.8.0)
23
+ rspec-core (2.8.0)
24
+ rspec-expectations (2.8.0)
25
+ diff-lcs (~> 1.1.2)
26
+ rspec-mocks (2.8.0)
27
+ term-ansicolor (1.0.7)
28
+
29
+ PLATFORMS
30
+ ruby
31
+
32
+ DEPENDENCIES
33
+ cucumber
34
+ mocha
35
+ rake
36
+ rspec (~> 2.8.0)
data/Rakefile CHANGED
@@ -1,17 +1,12 @@
1
1
  require 'rake'
2
- require 'spec'
2
+ require 'rspec'
3
+ require 'rspec/core/rake_task'
3
4
  require 'cucumber'
4
-
5
5
  require 'cucumber/rake/task'
6
- require 'spec/rake/spectask'
7
-
8
-
9
- spec_files = Rake::FileList["spec/**/*_spec.rb"]
10
6
 
11
7
  desc "Run specs"
12
- Spec::Rake::SpecTask.new do |t|
13
- t.spec_files = spec_files
14
- t.spec_opts = ["-c"]
8
+ RSpec::Core::RakeTask.new(:spec) do |t|
9
+ t.pattern = "spec/**/*_spec.rb"
15
10
  end
16
11
 
17
12
  Cucumber::Rake::Task.new(:features) do |t|
@@ -1,9 +1,9 @@
1
1
  Given /^a profile named "([^\"]*)" on "([^\"]*)"$/ do |name, tower|
2
- When 'I run rubywarrior'
3
- And 'I answer "y" to "create one?"'
4
- And 'I choose "' + tower + '" for "tower"'
5
- And 'I answer "' + name + '" to "name"'
6
- Then 'I should see "generated"'
2
+ step 'I run rubywarrior'
3
+ step 'I answer "y" to "create one?"'
4
+ step 'I choose "' + tower + '" for "tower"'
5
+ step 'I answer "' + name + '" to "name"'
6
+ step 'I should see "generated"'
7
7
  end
8
8
 
9
9
  Given /^no profile at "([^\"]*)"$/ do |path|
@@ -1,5 +1,5 @@
1
1
  require 'cucumber'
2
- require 'spec'
2
+ require 'rspec'
3
3
 
4
4
  require File.dirname(__FILE__) + '/../../lib/ruby_warrior'
5
5
 
@@ -156,7 +156,7 @@ module RubyWarrior
156
156
  end
157
157
 
158
158
  def tower_paths
159
- Dir[File.expand_path(File.dirname(__FILE__) + '/../../towers/*')]
159
+ Dir[File.expand_path('../../../towers/*', __FILE__)]
160
160
  end
161
161
 
162
162
 
@@ -24,7 +24,11 @@ module RubyWarrior
24
24
  end
25
25
 
26
26
  def load_path
27
- @profile.tower_path + "/level_" + @number.to_s.rjust(3, '0') + ".rb"
27
+ File.join(
28
+ File.expand_path('../../../towers/', __FILE__),
29
+ File.basename(@profile.tower_path) + "/level_" +
30
+ @number.to_s.rjust(3, '0') + ".rb"
31
+ )
28
32
  end
29
33
 
30
34
  def load_level
@@ -19,7 +19,7 @@ module RubyWarrior
19
19
  # TODO refactor and test this method
20
20
  def generate
21
21
  if level.number == 1
22
- FileUtils.mkdir_p(level.player_path)
22
+ FileUtils.mkdir_p(level.player_path) unless File.exists? level.player_path
23
23
  FileUtils.cp(templates_path + '/player.rb', level.player_path)
24
24
  end
25
25
 
@@ -29,7 +29,7 @@ module RubyWarrior
29
29
  end
30
30
 
31
31
  def templates_path
32
- File.expand_path(File.dirname(__FILE__) + "/../../templates")
32
+ File.expand_path("../../../templates", __FILE__)
33
33
  end
34
34
 
35
35
  private
@@ -62,7 +62,7 @@ module RubyWarrior
62
62
  end
63
63
 
64
64
  def tower
65
- Tower.new(@tower_path)
65
+ Tower.new(File.basename @tower_path)
66
66
  end
67
67
 
68
68
  def current_level
@@ -3,7 +3,7 @@ module RubyWarrior
3
3
  attr_reader :path
4
4
 
5
5
  def initialize(path)
6
- @path = path
6
+ @path = File.join(File.expand_path('../../../towers/', __FILE__), path)
7
7
  end
8
8
 
9
9
  def name
@@ -1,4 +1,4 @@
1
- require File.dirname(__FILE__) + '/../../spec_helper'
1
+ require 'spec_helper'
2
2
 
3
3
  describe RubyWarrior::Abilities::Attack do
4
4
  before(:each) do
@@ -1,4 +1,4 @@
1
- require File.dirname(__FILE__) + '/../../spec_helper'
1
+ require 'spec_helper'
2
2
 
3
3
  describe RubyWarrior::Abilities::Base do
4
4
  before(:each) do
@@ -1,4 +1,4 @@
1
- require File.dirname(__FILE__) + '/../../spec_helper'
1
+ require 'spec_helper'
2
2
 
3
3
  describe RubyWarrior::Abilities::Bind do
4
4
  before(:each) do
@@ -1,4 +1,4 @@
1
- require File.dirname(__FILE__) + '/../../spec_helper'
1
+ require 'spec_helper'
2
2
 
3
3
  describe RubyWarrior::Abilities::DirectionOf do
4
4
  before(:each) do
@@ -1,4 +1,4 @@
1
- require File.dirname(__FILE__) + '/../../spec_helper'
1
+ require 'spec_helper'
2
2
 
3
3
  describe RubyWarrior::Abilities::DirectionOfStairs do
4
4
  before(:each) do
@@ -1,4 +1,4 @@
1
- require File.dirname(__FILE__) + '/../../spec_helper'
1
+ require 'spec_helper'
2
2
 
3
3
  describe RubyWarrior::Abilities::DistanceOf do
4
4
  before(:each) do
@@ -1,4 +1,4 @@
1
- require File.dirname(__FILE__) + '/../../spec_helper'
1
+ require 'spec_helper'
2
2
 
3
3
  describe RubyWarrior::Abilities::Explode do
4
4
  before(:each) do
@@ -1,4 +1,4 @@
1
- require File.dirname(__FILE__) + '/../../spec_helper'
1
+ require 'spec_helper'
2
2
 
3
3
  describe RubyWarrior::Abilities::Feel do
4
4
  before(:each) do
@@ -1,4 +1,4 @@
1
- require File.dirname(__FILE__) + '/../../spec_helper'
1
+ require 'spec_helper'
2
2
 
3
3
  describe RubyWarrior::Abilities::Form do
4
4
  before(:each) do
@@ -1,4 +1,4 @@
1
- require File.dirname(__FILE__) + '/../../spec_helper'
1
+ require 'spec_helper'
2
2
 
3
3
  describe RubyWarrior::Abilities::Health do
4
4
  before(:each) do
@@ -1,4 +1,4 @@
1
- require File.dirname(__FILE__) + '/../../spec_helper'
1
+ require 'spec_helper'
2
2
 
3
3
  describe RubyWarrior::Abilities::Listen do
4
4
  before(:each) do
@@ -1,4 +1,4 @@
1
- require File.dirname(__FILE__) + '/../../spec_helper'
1
+ require 'spec_helper'
2
2
 
3
3
  describe RubyWarrior::Abilities::Look do
4
4
  before(:each) do
@@ -1,4 +1,4 @@
1
- require File.dirname(__FILE__) + '/../../spec_helper'
1
+ require 'spec_helper'
2
2
 
3
3
  describe RubyWarrior::Abilities::Pivot do
4
4
  before(:each) do
@@ -1,4 +1,4 @@
1
- require File.dirname(__FILE__) + '/../../spec_helper'
1
+ require 'spec_helper'
2
2
 
3
3
  describe RubyWarrior::Abilities::Rescue do
4
4
  before(:each) do
@@ -1,4 +1,4 @@
1
- require File.dirname(__FILE__) + '/../../spec_helper'
1
+ require 'spec_helper'
2
2
 
3
3
  describe RubyWarrior::Abilities::Rest do
4
4
  before(:each) do
@@ -1,4 +1,4 @@
1
- require File.dirname(__FILE__) + '/../../spec_helper'
1
+ require 'spec_helper'
2
2
 
3
3
  describe RubyWarrior::Abilities::Shoot do
4
4
  before(:each) do
@@ -1,4 +1,4 @@
1
- require File.dirname(__FILE__) + '/../../spec_helper'
1
+ require 'spec_helper'
2
2
 
3
3
  describe RubyWarrior::Abilities::Detonate do
4
4
  before(:each) do
@@ -1,4 +1,4 @@
1
- require File.dirname(__FILE__) + '/../../spec_helper'
1
+ require 'spec_helper'
2
2
 
3
3
  describe RubyWarrior::Abilities::Walk do
4
4
  before(:each) do
@@ -1,4 +1,4 @@
1
- require File.dirname(__FILE__) + '/../spec_helper'
1
+ require 'spec_helper'
2
2
 
3
3
  describe String do
4
4
  it "should wrap text at white space when over a specific character length" do
@@ -1,4 +1,4 @@
1
- require File.dirname(__FILE__) + '/../spec_helper'
1
+ require 'spec_helper'
2
2
 
3
3
  describe RubyWarrior::Floor do
4
4
  describe "2x3" do
@@ -1,4 +1,4 @@
1
- require File.dirname(__FILE__) + '/../spec_helper'
1
+ require 'spec_helper'
2
2
 
3
3
  describe RubyWarrior::Game do
4
4
  before(:each) do
@@ -74,7 +74,7 @@ describe RubyWarrior::Game do
74
74
  end
75
75
 
76
76
  it "should find tower paths using Dir[] search" do
77
- Dir.expects(:[]).with(File.expand_path(File.dirname(__FILE__) + '/../../towers/*'))
77
+ Dir.expects(:[]).with(File.expand_path('../../../towers/*', __FILE__))
78
78
  @game.tower_paths
79
79
  end
80
80
 
@@ -1,4 +1,4 @@
1
- require File.dirname(__FILE__) + '/../spec_helper'
1
+ require 'spec_helper'
2
2
 
3
3
  describe RubyWarrior::LevelLoader do
4
4
  describe "with profile" do
@@ -1,4 +1,4 @@
1
- require File.dirname(__FILE__) + '/../spec_helper'
1
+ require 'spec_helper'
2
2
  require 'set'
3
3
 
4
4
  describe RubyWarrior::Level do
@@ -51,7 +51,7 @@ describe RubyWarrior::Level do
51
51
 
52
52
  it "should have a load path from profile tower with level number in it" do
53
53
  @profile.stubs(:tower_path).returns('path/to/tower')
54
- @level.load_path.should == 'path/to/tower/level_001.rb'
54
+ @level.load_path.should == File.expand_path('towers/tower/level_001.rb')
55
55
  end
56
56
 
57
57
  it "should exist if file exists" do
@@ -1,4 +1,4 @@
1
- require File.dirname(__FILE__) + '/../spec_helper'
1
+ require 'spec_helper'
2
2
 
3
3
  describe RubyWarrior::PlayerGenerator do
4
4
  before(:each) do
@@ -7,6 +7,6 @@ describe RubyWarrior::PlayerGenerator do
7
7
  end
8
8
 
9
9
  it "should know templates path" do
10
- @generator.templates_path.should == File.expand_path(File.dirname(__FILE__) + "/../../templates")
10
+ @generator.templates_path.should == File.expand_path("../../../templates", __FILE__)
11
11
  end
12
12
  end
@@ -1,4 +1,4 @@
1
- require File.dirname(__FILE__) + '/../spec_helper'
1
+ require 'spec_helper'
2
2
 
3
3
  describe RubyWarrior::Position do
4
4
  before(:each) do
@@ -1,4 +1,4 @@
1
- require File.dirname(__FILE__) + '/../spec_helper'
1
+ require 'spec_helper'
2
2
 
3
3
  describe RubyWarrior::Profile do
4
4
  before(:each) do
@@ -164,7 +164,7 @@ describe RubyWarrior::Profile do
164
164
  end
165
165
 
166
166
  it "should load tower from path" do
167
- RubyWarrior::Tower.expects(:new).with('path/to/tower').returns('tower')
167
+ RubyWarrior::Tower.expects(:new).with('tower').returns('tower')
168
168
  @profile.tower.should == 'tower'
169
169
  end
170
170
  end
@@ -1,4 +1,4 @@
1
- require File.dirname(__FILE__) + '/../spec_helper'
1
+ require 'spec_helper'
2
2
 
3
3
  describe RubyWarrior::Space do
4
4
  before(:each) do
@@ -1,4 +1,4 @@
1
- require File.dirname(__FILE__) + '/../spec_helper'
1
+ require 'spec_helper'
2
2
 
3
3
  describe RubyWarrior::Tower do
4
4
  before(:each) do
@@ -1,4 +1,4 @@
1
- require File.dirname(__FILE__) + '/../spec_helper'
1
+ require 'spec_helper'
2
2
 
3
3
  describe RubyWarrior::Turn do
4
4
  describe "with actions" do
@@ -1,4 +1,4 @@
1
- require File.dirname(__FILE__) + '/../spec_helper'
1
+ require 'spec_helper'
2
2
 
3
3
  describe RubyWarrior::UI do
4
4
  before(:each) do
@@ -1,4 +1,4 @@
1
- require File.dirname(__FILE__) + '/../../spec_helper'
1
+ require 'spec_helper'
2
2
 
3
3
  describe RubyWarrior::Units::Archer do
4
4
  before(:each) do
@@ -1,4 +1,4 @@
1
- require File.dirname(__FILE__) + '/../../spec_helper'
1
+ require 'spec_helper'
2
2
 
3
3
  describe RubyWarrior::Units::Base do
4
4
  before(:each) do
@@ -1,4 +1,4 @@
1
- require File.dirname(__FILE__) + '/../../spec_helper'
1
+ require 'spec_helper'
2
2
 
3
3
  describe RubyWarrior::Units::Captive do
4
4
  before(:each) do
@@ -1,4 +1,4 @@
1
- require File.dirname(__FILE__) + '/../../spec_helper'
1
+ require 'spec_helper'
2
2
 
3
3
  describe RubyWarrior::Units::Golem do
4
4
  before(:each) do
@@ -1,4 +1,4 @@
1
- require File.dirname(__FILE__) + '/../../spec_helper'
1
+ require 'spec_helper'
2
2
 
3
3
  describe RubyWarrior::Units::Sludge do
4
4
  before(:each) do
@@ -1,4 +1,4 @@
1
- require File.dirname(__FILE__) + '/../../spec_helper'
1
+ require 'spec_helper'
2
2
 
3
3
  describe RubyWarrior::Units::ThickSludge do
4
4
  before(:each) do
@@ -1,4 +1,4 @@
1
- require File.dirname(__FILE__) + '/../../spec_helper'
1
+ require 'spec_helper'
2
2
 
3
3
  class Player
4
4
  def turn(warrior)
@@ -1,4 +1,4 @@
1
- require File.dirname(__FILE__) + '/../../spec_helper'
1
+ require 'spec_helper'
2
2
 
3
3
  describe RubyWarrior::Units::Wizard do
4
4
  before(:each) do
@@ -1,8 +1,8 @@
1
1
  require 'rubygems'
2
- require 'spec'
2
+ require 'rspec'
3
3
  require File.dirname(__FILE__) + '/../lib/ruby_warrior'
4
4
 
5
- Spec::Runner.configure do |config|
5
+ RSpec.configure do |config|
6
6
  config.mock_with :mocha
7
7
  config.before(:each) do
8
8
  RubyWarrior::Config.reset
@@ -3,7 +3,7 @@
3
3
  # --------
4
4
 
5
5
  description "It is too dark to see anything, but you smell sludge nearby."
6
- tip "Use warrior.feel.empty? to see if there's anything in front of you, and warrior.attack! to fight it. Remember, you can only do one action (ending in !) per turn."
6
+ tip "Use warrior.feel.empty? to see if there is anything in front of you, and warrior.attack! to fight it. Remember, you can only do one action (ending in !) per turn."
7
7
  clue "Add an if/else condition using warrior.feel.empty? to decide whether to warrior.attack! or warrior.walk!."
8
8
 
9
9
  time_bonus 20
@@ -4,7 +4,7 @@
4
4
 
5
5
  description "The air feels thicker than before. There must be a horde of sludge."
6
6
  tip "Be careful not to die! Use warrior.health to keep an eye on your health, and warrior.rest! to earn 10% of max health back."
7
- clue "When there's no enemy ahead of you, call warrior.rest! until health is full before walking forward."
7
+ clue "When there is no enemy ahead of you call warrior.rest! until health is full before walking forward."
8
8
 
9
9
  time_bonus 35
10
10
  ace_score 71
@@ -3,8 +3,8 @@
3
3
  # -------
4
4
 
5
5
  description "You hear cries for help. Captives must need rescuing."
6
- tip "Use warrior.feel.captive? to see if there's a captive, and warrior.rescue! to rescue him. Don't attack captives."
7
- clue "Don't forget to constantly check if you're taking damage and rest until your health is full if you aren't taking damage."
6
+ tip "Use warrior.feel.captive? to see if there is a captive and warrior.rescue! to rescue him. Don't attack captives."
7
+ clue "Don't forget to constantly check if you're taking damage. Rest until your health is full if you aren't taking damage."
8
8
 
9
9
  time_bonus 45
10
10
  ace_score 123
@@ -3,11 +3,11 @@
3
3
  # --------
4
4
 
5
5
  description "The wall behind you feels a bit further away in this room. And you hear more cries for help."
6
- tip "You can walk backward by passing ':backward' as an argument to walk!. Same goes for feel, rescue! and attack!."
6
+ tip "You can walk backward by passing ':backward' as an argument to walk!. Same goes for feel, rescue! and attack!. Archers have a limited attack distance."
7
7
  clue "Walk backward if you are taking damage from afar and do not have enough health to attack. You may also want to consider walking backward until warrior.feel(:backward).wall?."
8
8
 
9
9
  time_bonus 55
10
- ace_score 110
10
+ ace_score 105
11
11
  size 8, 1
12
12
  stairs 7, 0
13
13
 
@@ -5,7 +5,7 @@
5
5
 
6
6
  description "Another large room, but with several enemies blocking your way to the stairs."
7
7
  tip "Just like walking, you can attack! and feel in multiple directions (:forward, :left, :right, :backward)."
8
- clue "Call warrior.feel(direction).enemy? in each direction to make sure there isn't an enemy beside you (attack if there is). Call warrior.rest! if you're low and health when there's no enemies around."
8
+ clue "Call warrior.feel(direction).enemy? in each direction to make sure there isn't an enemy beside you (attack if there is). Call warrior.rest! if you're low and health when there are no enemies around."
9
9
 
10
10
  time_bonus 40
11
11
  ace_score 84
@@ -5,8 +5,8 @@
5
5
  # ---
6
6
 
7
7
  description "You feel slime on all sides, you're surrounded!"
8
- tip "Call warrior.bind!(direction) to bind an enemy to keep him from attacking. Bound enemies look like capitves."
9
- clue "Count the number of enemies around you, if there's two or more, bind one."
8
+ tip "Call warrior.bind!(direction) to bind an enemy to keep him from attacking. Bound enemies look like captives."
9
+ clue "Count the number of enemies around you. Bind an enemy if there are two or more."
10
10
 
11
11
  time_bonus 50
12
12
  ace_score 101
metadata CHANGED
@@ -1,33 +1,25 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: rubywarrior
3
- version: !ruby/object:Gem::Version
4
- hash: 31
5
- prerelease: false
6
- segments:
7
- - 0
8
- - 1
9
- - 2
10
- version: 0.1.2
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.3
5
+ prerelease:
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Ryan Bates
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2010-09-23 00:00:00 -07:00
19
- default_executable:
12
+ date: 2012-04-28 00:00:00.000000000Z
20
13
  dependencies: []
21
-
22
- description: You play as a warrior climbing a tall tower. On each floor you need to write a Ruby script to instruct the warrior to battle enemies, rescue captives, and reach the stairs.
14
+ description: You play as a warrior climbing a tall tower. On each floor you need to
15
+ write a Ruby script to instruct the warrior to battle enemies, rescue captives,
16
+ and reach the stairs.
23
17
  email: ryan@railscasts.com
24
- executables:
18
+ executables:
25
19
  - rubywarrior
26
20
  extensions: []
27
-
28
21
  extra_rdoc_files: []
29
-
30
- files:
22
+ files:
31
23
  - lib/ruby_warrior/abilities/attack.rb
32
24
  - lib/ruby_warrior/abilities/base.rb
33
25
  - lib/ruby_warrior/abilities/bind.rb
@@ -141,44 +133,33 @@ files:
141
133
  - templates/README.erb
142
134
  - bin/rubywarrior
143
135
  - CHANGELOG.rdoc
136
+ - Gemfile
137
+ - Gemfile.lock
144
138
  - LICENSE
145
139
  - Rakefile
146
140
  - README.rdoc
147
- has_rdoc: true
148
- homepage: http://github.com/ryanb/ruby-warrior
141
+ homepage: https://github.com/ryanb/ruby-warrior
149
142
  licenses: []
150
-
151
143
  post_install_message:
152
144
  rdoc_options: []
153
-
154
- require_paths:
145
+ require_paths:
155
146
  - lib
156
- required_ruby_version: !ruby/object:Gem::Requirement
147
+ required_ruby_version: !ruby/object:Gem::Requirement
157
148
  none: false
158
- requirements:
159
- - - ">="
160
- - !ruby/object:Gem::Version
161
- hash: 3
162
- segments:
163
- - 0
164
- version: "0"
165
- required_rubygems_version: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - ! '>='
151
+ - !ruby/object:Gem::Version
152
+ version: '0'
153
+ required_rubygems_version: !ruby/object:Gem::Requirement
166
154
  none: false
167
- requirements:
168
- - - ">="
169
- - !ruby/object:Gem::Version
170
- hash: 19
171
- segments:
172
- - 1
173
- - 3
174
- - 4
155
+ requirements:
156
+ - - ! '>='
157
+ - !ruby/object:Gem::Version
175
158
  version: 1.3.4
176
159
  requirements: []
177
-
178
160
  rubyforge_project: rubywarrior
179
- rubygems_version: 1.3.7
161
+ rubygems_version: 1.8.10
180
162
  signing_key:
181
163
  specification_version: 3
182
164
  summary: Game written in Ruby for learning Ruby and artificial intelligence.
183
165
  test_files: []
184
-