6 ms·
My attempt at Level 1: class Player def play_turn(warrior) warrior.walk!(:right) end end The warrior keeps bumping in to a wall, and the cod
by zkarcher 15y ago
My attempt at Level 1:
class Player
def play_turn(warrior)
warrior.walk!(:right)
end
end
The warrior keeps bumping in to a wall, and the code fails.
This is counter-intuitive, because the exit is to the right of the warrior. I can't endure another N levels of nonintuitive frustration, sorry.
- lloeki 15y agoactually the warrior starts facing right (which is not specified but could be supposed). so :right is actually moving down, since all movements are relative, which is inferred by :forward and :backward being present and :up :down missing, which I suppose would rather be :north :south :east and :west. Once you also understand that tips really are not, but the necessary API doc, well, it's smooth sailing.