Skip to content

Commit

Permalink
solucion de reset
Browse files Browse the repository at this point in the history
  • Loading branch information
FacundoDiezF committed Oct 17, 2024
1 parent cbe6039 commit 0ac0492
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions stickyBlocks.wlk
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ object juegoStickyBlock {
}

method reset(){
movimientos.forEach({mov => mov.unDo()})
movimientos.forEach({_=> self.unDo()}) // Ejecuta unDo() por la cantidad de movimientos ejecutados
}

method clear(){
Expand Down Expand Up @@ -68,8 +68,7 @@ object juegoStickyBlock {
method eliminarCompi(compi){
compis.remove(compi)
}



method moverCuerpo(direccion){

const cuerpoPuedeAvanzar = compis.all({compi => compi.puedeAvanzar(direccion.nuevaPosicion(compi))})
Expand Down

0 comments on commit 0ac0492

Please sign in to comment.