Skip to content
Browse files

Stairs space may not be empty

  • Loading branch information...
1 parent 03daf98 commit 59723f4c667da43806e174e990e1df29d72c4970 @gabebw committed Sep 23, 2010
Showing with 3 additions and 1 deletion.
  1. +3 −1 player.rb
View
4 player.rb
@@ -8,7 +8,9 @@ def play_turn(warrior)
@previous_health ||= current_health
taking_damage = (current_health < @previous_health)
space = warrior.feel
- if space.stairs?
+
+ # Stairs may not be empty
+ if space.stairs? and space.empty?
warrior.walk!
elsif space.captive?
warrior.rescue!

0 comments on commit 59723f4

Please sign in to comment.
Something went wrong with that request. Please try again.