rubywarrior 0.1.2 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (63) hide show
  1. checksums.yaml +7 -0
  2. data/{CHANGELOG.rdoc → CHANGELOG.md} +21 -3
  3. data/Gemfile +10 -0
  4. data/Gemfile.lock +55 -0
  5. data/LICENSE +4 -4
  6. data/{README.rdoc → README.md} +115 -93
  7. data/Rakefile +4 -9
  8. data/bin/rubywarrior +1 -1
  9. data/features/step_definitions/common_steps.rb +2 -2
  10. data/features/step_definitions/interaction_steps.rb +7 -7
  11. data/features/support/env.rb +1 -1
  12. data/lib/ruby_warrior/game.rb +5 -3
  13. data/lib/ruby_warrior/level.rb +5 -1
  14. data/lib/ruby_warrior/player_generator.rb +3 -3
  15. data/lib/ruby_warrior/profile.rb +1 -1
  16. data/lib/ruby_warrior/tower.rb +1 -1
  17. data/rubywarrior.gemspec +16 -0
  18. data/spec/ruby_warrior/abilities/attack_spec.rb +10 -10
  19. data/spec/ruby_warrior/abilities/base_spec.rb +19 -19
  20. data/spec/ruby_warrior/abilities/bind_spec.rb +5 -5
  21. data/spec/ruby_warrior/abilities/direction_of_spec.rb +3 -3
  22. data/spec/ruby_warrior/abilities/direction_of_stairs_spec.rb +3 -3
  23. data/spec/ruby_warrior/abilities/distance_of_spec.rb +3 -3
  24. data/spec/ruby_warrior/abilities/explode_spec.rb +7 -7
  25. data/spec/ruby_warrior/abilities/feel_spec.rb +1 -1
  26. data/spec/ruby_warrior/abilities/form_spec.rb +14 -14
  27. data/spec/ruby_warrior/abilities/health_spec.rb +3 -3
  28. data/spec/ruby_warrior/abilities/listen_spec.rb +3 -3
  29. data/spec/ruby_warrior/abilities/look_spec.rb +3 -3
  30. data/spec/ruby_warrior/abilities/pivot_spec.rb +1 -1
  31. data/spec/ruby_warrior/abilities/rescue_spec.rb +8 -8
  32. data/spec/ruby_warrior/abilities/rest_spec.rb +7 -7
  33. data/spec/ruby_warrior/abilities/shoot_spec.rb +4 -4
  34. data/spec/ruby_warrior/abilities/throw_spec.rb +10 -10
  35. data/spec/ruby_warrior/abilities/walk_spec.rb +5 -5
  36. data/spec/ruby_warrior/core_additions_spec.rb +2 -2
  37. data/spec/ruby_warrior/floor_spec.rb +27 -27
  38. data/spec/ruby_warrior/game_spec.rb +36 -36
  39. data/spec/ruby_warrior/level_loader_spec.rb +19 -19
  40. data/spec/ruby_warrior/level_spec.rb +57 -57
  41. data/spec/ruby_warrior/player_generator_spec.rb +3 -3
  42. data/spec/ruby_warrior/position_spec.rb +43 -43
  43. data/spec/ruby_warrior/profile_spec.rb +59 -59
  44. data/spec/ruby_warrior/space_spec.rb +71 -71
  45. data/spec/ruby_warrior/tower_spec.rb +5 -5
  46. data/spec/ruby_warrior/turn_spec.rb +13 -13
  47. data/spec/ruby_warrior/ui_spec.rb +32 -32
  48. data/spec/ruby_warrior/units/archer_spec.rb +9 -9
  49. data/spec/ruby_warrior/units/base_spec.rb +42 -42
  50. data/spec/ruby_warrior/units/captive_spec.rb +9 -9
  51. data/spec/ruby_warrior/units/golem_spec.rb +9 -9
  52. data/spec/ruby_warrior/units/sludge_spec.rb +11 -11
  53. data/spec/ruby_warrior/units/thick_sludge_spec.rb +7 -7
  54. data/spec/ruby_warrior/units/warrior_spec.rb +23 -23
  55. data/spec/ruby_warrior/units/wizard_spec.rb +9 -9
  56. data/spec/spec_helper.rb +3 -2
  57. data/towers/beginner/level_002.rb +1 -1
  58. data/towers/beginner/level_003.rb +1 -1
  59. data/towers/beginner/level_005.rb +2 -2
  60. data/towers/beginner/level_006.rb +2 -2
  61. data/towers/intermediate/level_002.rb +1 -1
  62. data/towers/intermediate/level_003.rb +2 -2
  63. metadata +47 -67
@@ -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,40 @@
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.2.0
11
5
  platform: ruby
12
- authors:
6
+ authors:
13
7
  - Ryan Bates
14
- autorequire:
8
+ autorequire:
15
9
  bindir: bin
16
10
  cert_chain: []
17
-
18
- date: 2010-09-23 00:00:00 -07:00
19
- default_executable:
11
+ date: 2024-03-26 00:00:00.000000000 Z
20
12
  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.
13
+ description: You play as a warrior climbing a tall tower. On each floor you need to
14
+ write a Ruby script to instruct the warrior to battle enemies, rescue captives,
15
+ and reach the stairs.
23
16
  email: ryan@railscasts.com
24
- executables:
17
+ executables:
25
18
  - rubywarrior
26
19
  extensions: []
27
-
28
20
  extra_rdoc_files: []
29
-
30
- files:
21
+ files:
22
+ - CHANGELOG.md
23
+ - Gemfile
24
+ - Gemfile.lock
25
+ - LICENSE
26
+ - README.md
27
+ - Rakefile
28
+ - bin/rubywarrior
29
+ - features/command_options.feature
30
+ - features/levels.feature
31
+ - features/profiles.feature
32
+ - features/step_definitions/common_steps.rb
33
+ - features/step_definitions/interaction_steps.rb
34
+ - features/support/env.rb
35
+ - features/support/mockio.rb
36
+ - features/towers.feature
37
+ - lib/ruby_warrior.rb
31
38
  - lib/ruby_warrior/abilities/attack.rb
32
39
  - lib/ruby_warrior/abilities/base.rb
33
40
  - lib/ruby_warrior/abilities/bind.rb
@@ -68,7 +75,7 @@ files:
68
75
  - lib/ruby_warrior/units/thick_sludge.rb
69
76
  - lib/ruby_warrior/units/warrior.rb
70
77
  - lib/ruby_warrior/units/wizard.rb
71
- - lib/ruby_warrior.rb
78
+ - rubywarrior.gemspec
72
79
  - spec/fixtures/short-tower/level_001.rb
73
80
  - spec/fixtures/short-tower/level_002.rb
74
81
  - spec/fixtures/walking_player.rb
@@ -111,14 +118,8 @@ files:
111
118
  - spec/ruby_warrior/units/warrior_spec.rb
112
119
  - spec/ruby_warrior/units/wizard_spec.rb
113
120
  - spec/spec_helper.rb
114
- - features/command_options.feature
115
- - features/levels.feature
116
- - features/profiles.feature
117
- - features/step_definitions/common_steps.rb
118
- - features/step_definitions/interaction_steps.rb
119
- - features/support/env.rb
120
- - features/support/mockio.rb
121
- - features/towers.feature
121
+ - templates/README.erb
122
+ - templates/player.rb
122
123
  - towers/beginner/level_001.rb
123
124
  - towers/beginner/level_002.rb
124
125
  - towers/beginner/level_003.rb
@@ -137,48 +138,27 @@ files:
137
138
  - towers/intermediate/level_007.rb
138
139
  - towers/intermediate/level_008.rb
139
140
  - towers/intermediate/level_009.rb
140
- - templates/player.rb
141
- - templates/README.erb
142
- - bin/rubywarrior
143
- - CHANGELOG.rdoc
144
- - LICENSE
145
- - Rakefile
146
- - README.rdoc
147
- has_rdoc: true
148
- homepage: http://github.com/ryanb/ruby-warrior
149
- licenses: []
150
-
151
- post_install_message:
141
+ homepage: https://github.com/ryanb/ruby-warrior
142
+ licenses:
143
+ - MIT
144
+ metadata: {}
145
+ post_install_message:
152
146
  rdoc_options: []
153
-
154
- require_paths:
147
+ require_paths:
155
148
  - lib
156
- required_ruby_version: !ruby/object:Gem::Requirement
157
- none: false
158
- requirements:
149
+ required_ruby_version: !ruby/object:Gem::Requirement
150
+ requirements:
159
151
  - - ">="
160
- - !ruby/object:Gem::Version
161
- hash: 3
162
- segments:
163
- - 0
164
- version: "0"
165
- required_rubygems_version: !ruby/object:Gem::Requirement
166
- none: false
167
- requirements:
152
+ - !ruby/object:Gem::Version
153
+ version: '0'
154
+ required_rubygems_version: !ruby/object:Gem::Requirement
155
+ requirements:
168
156
  - - ">="
169
- - !ruby/object:Gem::Version
170
- hash: 19
171
- segments:
172
- - 1
173
- - 3
174
- - 4
157
+ - !ruby/object:Gem::Version
175
158
  version: 1.3.4
176
159
  requirements: []
177
-
178
- rubyforge_project: rubywarrior
179
- rubygems_version: 1.3.7
180
- signing_key:
181
- specification_version: 3
182
- summary: Game written in Ruby for learning Ruby and artificial intelligence.
160
+ rubygems_version: 3.5.3
161
+ signing_key:
162
+ specification_version: 4
163
+ summary: Game written in Ruby for learning Ruby.
183
164
  test_files: []
184
-