warrior.look returns wall for stairs? #49

Open
meesterdude opened this Issue Jan 21, 2012 · 5 comments

Comments

Projects
None yet
5 participants
@meesterdude

Maybe I don't understand the grander dynamics yet of the game, but, shouldn't our warrior be able to see stairs? He can warrior.feel stairs, and the stairs are a distinct icon on the map like everything else, but he can't see them? I'm a little puzzled by that.

@ryanb

This comment has been minimized.

Show comment Hide comment
@ryanb

ryanb Apr 28, 2012

Owner

Does warrior.feel.stairs? not work for you? That should return true/false depending on if there are stairs on that space.

Owner

ryanb commented Apr 28, 2012

Does warrior.feel.stairs? not work for you? That should return true/false depending on if there are stairs on that space.

@meesterdude

This comment has been minimized.

Show comment Hide comment
@meesterdude

meesterdude Apr 29, 2012

warrior.feel.stairs? does work. My question was why does the warrior see a wall where there are stairs? From what I recall I had cleared out the room of bad dudes and wanted the warrior to just walk forward if he saw stairs in front of him.

warrior.feel.stairs? does work. My question was why does the warrior see a wall where there are stairs? From what I recall I had cleared out the room of bad dudes and wanted the warrior to just walk forward if he saw stairs in front of him.

@ronald

This comment has been minimized.

Show comment Hide comment
@ronald

ronald Sep 24, 2013

Problem exists when using Strings.


@ >

p w.look.map(&:to_s)
=> ["nothing", "nothing", "wall"]
p w.look.map(&:stairs?)
=> [false, true, false]

Perhaps https://github.com/ryanb/ruby-warrior/blob/master/lib/ruby_warrior/space.rb#L61 needs a special case for stairs.

ronald commented Sep 24, 2013

Problem exists when using Strings.


@ >

p w.look.map(&:to_s)
=> ["nothing", "nothing", "wall"]
p w.look.map(&:stairs?)
=> [false, true, false]

Perhaps https://github.com/ryanb/ruby-warrior/blob/master/lib/ruby_warrior/space.rb#L61 needs a special case for stairs.

@hsukevin

This comment has been minimized.

Show comment Hide comment
@hsukevin

hsukevin Jul 26, 2015

Stairs should really be another case, and not a sub of wall. This code should be refactored

Stairs should really be another case, and not a sub of wall. This code should be refactored

@bf4

This comment has been minimized.

Show comment Hide comment
@bf4

bf4 Jul 26, 2015

You volunteering?

bf4 commented Jul 26, 2015

You volunteering?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment