-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reciclando papeles #59
Conversation
…nto reciclandoPapeles
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💯
src/escenas/ReciclandoPapeles.ts
Outdated
cantidadDePapelesSinLevantar(): number { | ||
var cant: number = 0; | ||
this.papeles.forEach( papel => cant += papel.subactores[0].vivo ); | ||
return cant; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
¿Se usa la cantidad para algo más que si está resuelto el problema?
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 ); | |
} |
Si es solo para verificar si hay papeles quizás queda mas expresivo así
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Por un "problema en la logica" donde puedo levantar un papel y poner ese MISMO papel, sin soltarlo en todos los tachos, es que corroboro que sea la cantidad de filas. Por eso hice la cuenta. Es mas que nada para manejar el error.
No... estoy mal yo... Eso es con los tachos, no con los papeles. Esta perfecto lo que sugeris. Ya lo uso asi. Gracias
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
de todas formas, me bajo tu reforma y la pruebo en los tests y en el ejemplo. Gracias
Program-AR/pilas-bloques-ember#1364