Skip to content
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

Merged
merged 11 commits into from
Oct 28, 2023
Merged

Reciclando papeles #59

merged 11 commits into from
Oct 28, 2023

Conversation

danielferro69
Copy link
Contributor

Copy link
Contributor

@dlopezalvas dlopezalvas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯

Comment on lines 65 to 69
cantidadDePapelesSinLevantar(): number {
var cant: number = 0;
this.papeles.forEach( papel => cant += papel.subactores[0].vivo );
return cant;
}
Copy link
Contributor

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?

Suggested change
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í

Copy link
Contributor Author

@danielferro69 danielferro69 Oct 28, 2023

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

Copy link
Contributor Author

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

@danielferro69 danielferro69 merged commit ef35524 into master Oct 28, 2023
2 checks passed
@danielferro69 danielferro69 deleted the reciclandoPapeles branch October 28, 2023 12:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants