diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..8e84736 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,14 @@ +name: build + +on: [push, pull_request] +jobs: + wollok-ts: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - run: | + wget -O wollok-ts-cli https://github.com/uqbar-project/wollok-ts-cli/releases/latest/download/wollok-ts-cli-linux-x64 + chmod a+x ./wollok-ts-cli + ./wollok-ts-cli test --skipValidations -p ./ + shell: bash diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9e95028 --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ + +# Local history +.history + +# Wollok Log +*.log diff --git a/README.md b/README.md new file mode 100644 index 0000000..4a885a1 --- /dev/null +++ b/README.md @@ -0,0 +1,22 @@ +# (reemplazar nombre de juego acá) + +UTN - Facultad Regional Buenos Aires - Materia Paradigmas de Programación + +## Equipo de desarrollo: + +- completar... +- completar... + + +## Capturas + +![pepita](assets/golondrina.png) + +## Reglas de Juego / Instrucciones + +(completar...) + +## Controles: + +- `W` para... + diff --git a/assets/golondrina.png b/assets/golondrina.png new file mode 100644 index 0000000..1660f61 Binary files /dev/null and b/assets/golondrina.png differ diff --git a/main.wpgm b/main.wpgm new file mode 100644 index 0000000..4337325 --- /dev/null +++ b/main.wpgm @@ -0,0 +1,16 @@ +import wollok.game.* + +import pepita.* + +program PepitaGame { + game.title("Pepita") + game.height(10) + game.width(10) + game.cellSize(100) + + game.addVisual(pepita) + + keyboard.w().onPressDo({ pepita.fly(1) }) + + game.start() +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..a879289 --- /dev/null +++ b/package.json @@ -0,0 +1,8 @@ +{ + "name": "2024-o-tpijuego", + "version": "1.0.0", + "resourceFolder": "assets", + "wollokVersion": "4.0.0", + "author": "usuario", + "license": "ISC" +} diff --git a/pepita.wlk b/pepita.wlk new file mode 100644 index 0000000..8763973 --- /dev/null +++ b/pepita.wlk @@ -0,0 +1,16 @@ +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 new file mode 100644 index 0000000..7342cd1 --- /dev/null +++ b/pruebas.wtest @@ -0,0 +1,9 @@ +import pepita.* + +describe "group of tests for pepita" { + + test "pepita has initial energy" { + assert.equals(100, pepita.energy()) + } + +} \ No newline at end of file