Module: RSokoban::Moveable

Included in:
Crate, Man
Defined in:
lib/rsokoban/moveable.rb

Overview

Permits to move one box in all 4 directions.

Instance Method Summary collapse

Instance Method Details

#downObject



9
10
11
# File 'lib/rsokoban/moveable.rb', line 9

def down
	@y += 1
end

#leftObject



13
14
15
# File 'lib/rsokoban/moveable.rb', line 13

def left
	@x -= 1
end

#rightObject



17
18
19
# File 'lib/rsokoban/moveable.rb', line 17

def right
	@x += 1
end

#upObject



5
6
7
# File 'lib/rsokoban/moveable.rb', line 5

def up
	@y -= 1
end