diff --git a/assets/golondrina.png b/assets/golondrina.png deleted file mode 100644 index 1660f61..0000000 Binary files a/assets/golondrina.png and /dev/null differ diff --git a/assets/morcilla.png b/assets/morcilla.png new file mode 100644 index 0000000..e864145 Binary files /dev/null and b/assets/morcilla.png differ diff --git a/assets/test.png b/assets/test.png new file mode 100644 index 0000000..d84f5d5 Binary files /dev/null and b/assets/test.png differ diff --git a/main.wpgm b/main.wpgm index 4337325..78f7476 100644 --- a/main.wpgm +++ b/main.wpgm @@ -1,16 +1,16 @@ import wollok.game.* -import pepita.* +import morcilla.* -program PepitaGame { - game.title("Pepita") +program MorcillaGame { + game.title("La Bizarra Aventura de MORCILLA") game.height(10) game.width(10) game.cellSize(100) - game.addVisual(pepita) + game.addVisual(morcilla) - keyboard.w().onPressDo({ pepita.fly(1) }) + keyboard.d().onPressDo({ morcilla.caminar(1) }) game.start() } diff --git a/morcilla.wlk b/morcilla.wlk new file mode 100644 index 0000000..84a5532 --- /dev/null +++ b/morcilla.wlk @@ -0,0 +1,11 @@ +object morcilla { + var property position = new MutablePosition(x=0, y=0) + + method image() = "morcilla.png" + method position() = position + + method caminar(pasos) { + position.goRight(pasos) + } + +} \ No newline at end of file diff --git a/pepita.wlk b/pepita.wlk deleted file mode 100644 index 8763973..0000000 --- a/pepita.wlk +++ /dev/null @@ -1,16 +0,0 @@ -object pepita { - var energy = 100 - const position = new MutablePosition(x=0, y=0) - - method image() = "golondrina.png" - method position() = position - - method energy() = energy - - method fly(minutes) { - energy = energy - minutes * 3 - position.goRight(minutes) - position.goUp(minutes) - } - -} \ No newline at end of file diff --git a/pruebas.wtest b/pruebas.wtest index 7342cd1..3cc7efc 100644 --- a/pruebas.wtest +++ b/pruebas.wtest @@ -1,9 +1,2 @@ -import pepita.* +import morcilla.* -describe "group of tests for pepita" { - - test "pepita has initial energy" { - assert.equals(100, pepita.energy()) - } - -} \ No newline at end of file