Skip to content

Commit

Permalink
Sugerencia de Diana
Browse files Browse the repository at this point in the history
  • Loading branch information
danielferro69 committed Oct 28, 2023
1 parent 2094cb6 commit 8e87c77
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/escenas/ReciclandoPapeles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,17 +55,15 @@ class ReciclandoPapeles extends EscenaActividad {
}

estaResueltoElProblema(){
return this.hayTachosLlenosAlFinalDeLasFilas() && this.cuadricula.cantFilas === this.cantidadDeTachosLlenos() && !this.cantidadDePapelesSinLevantar();
return this.hayTachosLlenosAlFinalDeLasFilas() && this.cuadricula.cantFilas === this.cantidadDeTachosLlenos() && !this.hayPapelesSinLevantar();
}

hayTachosLlenosAlFinalDeLasFilas(){
return this.tachos.every( tacho => tacho.subactores[0].estaLleno() );
}

cantidadDePapelesSinLevantar(): number {
var cant: number = 0;
this.papeles.forEach( papel => cant += papel.subactores[0].vivo );
return cant;
hayPapelesSinLevantar(): boolean {
return this.papeles.every( papel => papel.subactores[0].vivo );
}

cantidadDeTachosLlenos(): number {
Expand Down

0 comments on commit 8e87c77

Please sign in to comment.