mirror of
https://github.com/gwenhael-le-moine/c-urs_-toil-s.git
synced 2024-12-26 09:58:48 +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
|
||||
end
|
||||
|
||||
def move( direction )
|
||||
def move( direction, objectToMove )
|
||||
d = { :h => 0, :v => 0 }
|
||||
d[ :h ] = -1 if direction == :left
|
||||
d[ :h ] = 1 if direction == :right
|
||||
|
@ -389,7 +389,7 @@ class TestBla < Test::Unit::TestCase
|
|||
|
||||
moves.each do
|
||||
|direction|
|
||||
st.move( direction )
|
||||
st.move( direction, :ball )
|
||||
# puts st.is_it_over? ? "YES \o/" : "not yet"
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue