Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
github-classroom[bot] authored Sep 19, 2024
0 parents commit a321013
Show file tree
Hide file tree
Showing 8 changed files with 91 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -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
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

# Local history
.history

# Wollok Log
*.log
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -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...

Binary file added assets/golondrina.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions main.wpgm
Original file line number Diff line number Diff line change
@@ -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()
}
8 changes: 8 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"name": "2024-o-tpijuego",
"version": "1.0.0",
"resourceFolder": "assets",
"wollokVersion": "4.0.0",
"author": "usuario",
"license": "ISC"
}
16 changes: 16 additions & 0 deletions pepita.wlk
Original file line number Diff line number Diff line change
@@ -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)
}

}
9 changes: 9 additions & 0 deletions pruebas.wtest
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import pepita.*

describe "group of tests for pepita" {

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

}

0 comments on commit a321013

Please sign in to comment.