Skip to content

Commit

Permalink
commit
Browse files Browse the repository at this point in the history
  • Loading branch information
AyalaSebastian committed Oct 1, 2024
1 parent 65bee20 commit 4213772
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 28 deletions.
File renamed without changes
16 changes: 4 additions & 12 deletions main.wpgm
Original file line number Diff line number Diff line change
@@ -1,16 +1,8 @@
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) })
import racismo.*

program RacismoGame {
juegoDeRacismo.iniciar()
game.start()
}
}
16 changes: 0 additions & 16 deletions pepita.wlk

This file was deleted.

37 changes: 37 additions & 0 deletions racismo.wlk
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
object juegoDeRacismo {
method iniciar(){
game.height(10)
game.width(10)

//game.addVisual(algo)
//game.addVisualCharacter(mario)

//quiero que mi personaje se mueva de derecha a izquierda
//keyboard.a().onPressDo({negro.irALaIzq()})


game.onCollideDo(mario, {algo=>algo.agarrar()})
game.onTick(1000, "moverse", {robot.moverseSolo()})
}

object negro{

var dondeEsta = game.origin()

method position() = dondeEsta

//method image() = if (dondeEsta.x() == 8) "vegeta.jpg" else "mario.png"

method position(nueva) {
dondeEsta = nueva
}

method irAlBorde() {
dondeEsta = game.at(8,dondeEsta.y())
game.schedule(300, {dondeEsta = dondeEsta.up(1)})

}



}

0 comments on commit 4213772

Please sign in to comment.