Skip to content

Commit

Permalink
Primeras cositas
Browse files Browse the repository at this point in the history
Co-authored-by: Juan Cruz <[email protected]>
  • Loading branch information
bcochon and Juanter134 committed Sep 30, 2024
1 parent 8a14736 commit be0e84d
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 29 deletions.
Binary file removed assets/golondrina.png
Binary file not shown.
Binary file added assets/morcilla.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/test.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 5 additions & 5 deletions main.wpgm
Original file line number Diff line number Diff line change
@@ -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()
}
11 changes: 11 additions & 0 deletions morcilla.wlk
Original file line number Diff line number Diff line change
@@ -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)
}

}
16 changes: 0 additions & 16 deletions pepita.wlk

This file was deleted.

9 changes: 1 addition & 8 deletions pruebas.wtest
Original file line number Diff line number Diff line change
@@ -1,9 +1,2 @@
import pepita.*
import morcilla.*

describe "group of tests for pepita" {

test "pepita has initial energy" {
assert.equals(100, pepita.energy())
}

}

0 comments on commit be0e84d

Please sign in to comment.