mirror of
https://github.com/gwenhael-le-moine/c-urs_-toil-s.git
synced 2024-12-27 09:58:44 +01:00
add object to move
This commit is contained in:
parent
3ec2e98afa
commit
6e40724dd7
1 changed files with 2 additions and 2 deletions
4
star.rb
4
star.rb
|
@ -285,7 +285,7 @@ class Star
|
||||||
load_level
|
load_level
|
||||||
end
|
end
|
||||||
|
|
||||||
def move( direction )
|
def move( direction, objectToMove )
|
||||||
d = { :h => 0, :v => 0 }
|
d = { :h => 0, :v => 0 }
|
||||||
d[ :h ] = -1 if direction == :left
|
d[ :h ] = -1 if direction == :left
|
||||||
d[ :h ] = 1 if direction == :right
|
d[ :h ] = 1 if direction == :right
|
||||||
|
@ -389,7 +389,7 @@ class TestBla < Test::Unit::TestCase
|
||||||
|
|
||||||
moves.each do
|
moves.each do
|
||||||
|direction|
|
|direction|
|
||||||
st.move( direction )
|
st.move( direction, :ball )
|
||||||
# puts st.is_it_over? ? "YES \o/" : "not yet"
|
# puts st.is_it_over? ? "YES \o/" : "not yet"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue