Skip to content

Commit

Permalink
Sigo Probando Failure
Browse files Browse the repository at this point in the history
  • Loading branch information
MatePirchi committed Nov 8, 2024
1 parent a0b0e0c commit d0af867
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions juego.wlk
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,7 @@ class BloqueTetris{
c.asumirPosicionRotada()
d.asumirPosicionRotada()
}
else if(listaValoresReturn.any({valorReturn => valorReturn == 1})){
return
}
else{
else if(!listaValoresReturn.any({valorReturn => valorReturn == 1})){
const dirLejosDePared = listaValoresReturn.filter({valorReturn => valorReturn != 1 && valorReturn != 0}).head()
if(controlador.dirEstaLibre(dirLejosDePared, [a, b, c, d])){
self.mover(dirLejosDePared)// Se mueve 1 casilla lejos de la pared lateral
Expand All @@ -44,10 +41,7 @@ class BloqueTetris{
c.asumirPosicionRotada()
d.asumirPosicionRotada()
}
else if(listaValoresReturn.any({valorReturn => valorReturn == 1})){
return
}
else{
else if(!listaValoresReturn.any({valorReturn => valorReturn == 1})){
const dirLejosDePared = listaValoresReturn.filter({valorReturn => valorReturn != 1 && valorReturn != 0}).head()
if(controlador.dirEstaLibre(dirLejosDePared, [a, b, c, d])){
self.mover(dirLejosDePared)// Se mueve 1 casilla lejos de la pared lateral
Expand Down

0 comments on commit d0af867

Please sign in to comment.