Module: RSokoban::Moveable
Overview
Permits to move one box in all 4 directions.
Instance Method Summary collapse
Instance Method Details
#down ⇒ Object
9 10 11 |
# File 'lib/rsokoban/moveable.rb', line 9 def down @y += 1 end |
#left ⇒ Object
13 14 15 |
# File 'lib/rsokoban/moveable.rb', line 13 def left @x -= 1 end |
#right ⇒ Object
17 18 19 |
# File 'lib/rsokoban/moveable.rb', line 17 def right @x += 1 end |
#up ⇒ Object
5 6 7 |
# File 'lib/rsokoban/moveable.rb', line 5 def up @y -= 1 end |