Skip to content

Commit

Permalink
lionel va al inicio
Browse files Browse the repository at this point in the history
  • Loading branch information
lgassman committed Sep 30, 2024
1 parent 93e68f7 commit 5983380
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
11 changes: 11 additions & 0 deletions futbolito.wtest
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import objetos.*
import wollok.game.*

describe "futbolito" {
test "inicio" {
const inicio = game.at(0,5)
assert.notEquals(inicio, lionel.position())
lionel.inicio()
assert.equals(inicio, lionel.position())
}
}
4 changes: 4 additions & 0 deletions objetos.wlk
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ object lionel {
method avanzar() {
position = game.at((game.width() - 1).min(position.x() + 1), position.y())
}

method inicio(){
position = game.at(0, 5)
}

}

Expand Down

0 comments on commit 5983380

Please sign in to comment.