Skip to content

Commit

Permalink
mini adaptacion a plataforma
Browse files Browse the repository at this point in the history
  • Loading branch information
elin-winter committed Nov 12, 2024
1 parent 22b7282 commit daf212b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 13 deletions.
1 change: 0 additions & 1 deletion directions.wlk
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ object down inherits Direction {
override method actualizarPosicion(character, _) {
character.position().goDown(unidadMovimiento)
}

}


16 changes: 4 additions & 12 deletions elements.wlk
Original file line number Diff line number Diff line change
Expand Up @@ -260,14 +260,6 @@ class PlataformaBase {
method detachCharacter() {
personajeAdherido = null
}

// Sobrescritos en las Subclases
// (Los dejo con {}, porque no debe ser abstracta)

method hastaMinPosicion() {}
method hastaMaxPosicion() {}
method move() {}
method moveBack() {}
}

class PlataformaMovible inherits PlataformaBase {
Expand All @@ -280,8 +272,8 @@ class PlataformaMovible inherits PlataformaBase {

method image() = image

override method hastaMinPosicion() = self.checkPosition() != posicionMin
override method hastaMaxPosicion() = self.checkPosition() != posicionMax
method hastaMinPosicion() = self.checkPosition() != posicionMin
method hastaMaxPosicion() = self.checkPosition() != posicionMax


method checkPosition() {
Expand All @@ -296,8 +288,8 @@ class PlataformaMovible inherits PlataformaBase {
platAsocs.forEach { x => x.moveDirection(direction)}
}

override method move() {self.moveDirection(dirOriginal)}
override method moveBack() {self.moveDirection(dirVuelta)}
method move() {self.moveDirection(dirOriginal)}
method moveBack() {self.moveDirection(dirVuelta)}
}


Expand Down

0 comments on commit daf212b

Please sign in to comment.