Skip to content

Commit

Permalink
Varias correciones implementadas | Nivel 2 creado | Niveles modulariz…
Browse files Browse the repository at this point in the history
…ados
  • Loading branch information
AscarlatoUTN committed Oct 23, 2024
1 parent b87948e commit f4dd45d
Show file tree
Hide file tree
Showing 8 changed files with 4 additions and 9 deletions.
1 change: 0 additions & 1 deletion ExplicacionTeorica.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,4 @@ El *polimorfismo* también se aplica a los objetos del juego, como los diamantes
A partir de esto, apreciamos que el polimorfismo otorga flexibilidad y facilita la reutilización de código, además de tornarlo más extensible y fácil de mantener.

# Diagrama de Clases

![alt text](Diagrama.png)
3 changes: 1 addition & 2 deletions characters.wlk
Original file line number Diff line number Diff line change
Expand Up @@ -192,5 +192,4 @@ object fuego {}

object agua {}

object acido {}

object acido {}
1 change: 0 additions & 1 deletion config.wlk
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,6 @@ object finJuego{
method position() = game.origin()

method image () = "F_Fin_De_Juego.png"

}

//Manejo de Zonas y Charcos
Expand Down
2 changes: 0 additions & 2 deletions elements.wlk
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,12 @@ class Diamante {
game.removeVisual(self)
game.sound("S_diamante.mp3").play()
// efecto visual, sonido, palabritas

}
}

method fuiRecolectado() = fuiRecolectado

method canCollect(personaje) = personaje.tipo() == self.tipo()

}

class DiamanteRojo inherits Diamante {
Expand Down
1 change: 0 additions & 1 deletion level_1.wlk
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@ object level1 inherits Level {

// Limpieza al final del juego

// Lista de elementos del nivel 1
const elementosNivel1 = [[fireboy, watergirl, caja, puertaFireboy1, puertaFireboy2, puertaWatergirl1, puertaWatergirl2, extensionPlatAmarilla1, extensionPlatAmarilla2, plataformaAmarilla, botonAmarilloA, botonAmarilloB, botonInvAmarilloBDer, botonInvAmarilloBIzq, botonInvAmarilloDer, botonInvAmarilloIzq, botonInvBordoADer, botonInvBordoAIzq, botonInvBordoBDer, botonInvBordoBIzq, extensionPlatBordo1, plataformaBordo, extensionPlatBordo2, botonBordoA, botonBordoB], diamantes]

override method cleanVisuals() {
Expand Down
2 changes: 1 addition & 1 deletion level_2.wlk
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ object level2 inherits Level {
marcoJuego.add(new Zona (xMin = 22, xMax = 30, yMin = 23, yMax = 23 ))
}

//Agregamos elementos
//Agregamos elementos

override method setupElements() {
elementosNivel2.forEach({lista => lista.forEach({element => game.addVisual(element)})})
Expand Down
2 changes: 1 addition & 1 deletion main.wpgm
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ program FireBoyWaterGirlGame {
fondo.shouldLoop(true)
game.schedule(500, { fondo.play() fondo.volume(0.3)} )

// Inicial
// Inicio del nivel 1
settings.init("FireBoyAndWaterGirl", "F_lobby.png", 29, 39, 36)
keyboard.enter().onPressDo({level1.setupMechanicsInit()})

Expand Down
1 change: 1 addition & 0 deletions pruebas.wtest
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ describe "Movimientos de los Personajes" {
assert.equals(6, watergirl.position().x()) // Debería moverse 1 unidad a la derecha
assert.equals(5, watergirl.position().y()) // La coordenada y no debería cambiar
}

test "Fireboy - No atraviesa los pisos intermedios"{
const invalidPositions = [[2,3]]

Expand Down

0 comments on commit f4dd45d

Please sign in to comment.