Skip to content

Commit

Permalink
Migración a Wollok TS
Browse files Browse the repository at this point in the history
  • Loading branch information
fdodino committed May 25, 2024
1 parent daf2032 commit 0e4a0e6
Show file tree
Hide file tree
Showing 23 changed files with 67 additions and 141 deletions.
8 changes: 0 additions & 8 deletions .classpath

This file was deleted.

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
1 change: 0 additions & 1 deletion .gitignore

This file was deleted.

35 changes: 0 additions & 35 deletions .project

This file was deleted.

7 changes: 0 additions & 7 deletions .settings/org.eclipse.jdt.core.prefs

This file was deleted.

8 changes: 0 additions & 8 deletions .travis.yml

This file was deleted.

22 changes: 0 additions & 22 deletions META-INF/MANIFEST.MF

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# granja-de-orson-game

[![Build Status](https://travis-ci.org/wollok/granjaDeOrsonGame.svg?branch=master)](https://travis-ci.org/wollok/granjaDeOrsonGame)
[![Build Status](https://github.com/wollok/granjaDeOrsonGame/actions/workflows/ci.yml/badge.svg)](https://github.com/wollok/granjaDeOrsonGame/actions/workflows/ci.yml)

Juego hecho con Wollok-Game. Ayuda a Orson a salir de la granja!

Expand Down
File renamed without changes.
4 changes: 0 additions & 4 deletions build.properties

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
64 changes: 32 additions & 32 deletions src/movimiento.wlk → movimiento.wlk
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
import wollok.game.*

object movimiento {

method configurarFlechas(visual){
keyboard.up().onPressDo{ self.mover(arriba,visual)}
keyboard.down().onPressDo{ self.mover(abajo,visual)}
keyboard.left().onPressDo{ self.mover(izquierda,visual)}
keyboard.right().onPressDo{ self.mover(derecha,visual)}
}

method mover(direccion,personaje){
personaje.position(direccion.siguiente(personaje.position()))
}

}

object izquierda {
method siguiente(position) = position.left(1)
}

object derecha {
method siguiente(position) = position.right(1)
}

object abajo {
method siguiente(position) = position.down(1)
}

object arriba {
method siguiente(position) = position.up(1)
}
import wollok.game.*

object movimiento {

method configurarFlechas(visual){
keyboard.up().onPressDo{ self.mover(arriba,visual)}
keyboard.down().onPressDo{ self.mover(abajo,visual)}
keyboard.left().onPressDo{ self.mover(izquierda,visual)}
keyboard.right().onPressDo{ self.mover(derecha,visual)}
}

method mover(direccion,personaje){
personaje.position(direccion.siguiente(personaje.position()))
}

}

object izquierda {
method siguiente(position) = position.left(1)
}

object derecha {
method siguiente(position) = position.right(1)
}

object abajo {
method siguiente(position) = position.down(1)
}

object arriba {
method siguiente(position) = position.up(1)
}
File renamed without changes.
7 changes: 7 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "granjaDeOrsonGame",
"version": "1.0.0",
"wollokVersion": "4.0.0",
"author": "dodain",
"license": "ISC"
}
26 changes: 13 additions & 13 deletions src/game.wpgm → pgmGame.wpgm
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import wollok.game.*
import nivel.*
/*
* Usa las flechas del teclado para mover a Orson. Y la tecla 'H' para pedirle alguna ayuda.
* Ayúdalo a comprarse un tractor para que pueda salir de la granja.
*
*/
program GranjaDeOrson {
nivel.configurate()
game.start()
}
import wollok.game.*
import nivel.*

/*
* Usa las flechas del teclado para mover a Orson. Y la tecla 'H' para pedirle alguna ayuda.
* Ayúdalo a comprarse un tractor para que pueda salir de la granja.
*
*/

program GranjaDeOrson {
nivel.configurate()
game.start()
}
10 changes: 0 additions & 10 deletions src/log4j.properties

This file was deleted.

File renamed without changes.
File renamed without changes.

0 comments on commit 0e4a0e6

Please sign in to comment.