minitruco-android icon indicating copy to clipboard operation
minitruco-android copied to clipboard

Adding enumerator instead of static final integers

Open somalieca opened this issue 7 years ago • 3 comments

As stated in the book Effective Java on page 147, the use of enumerators is way better than static.

somalieca avatar Jul 03 '17 20:07 somalieca

Hi! Thank you for your contribution @somalieca. Indeed, Enumerators are a better choice for this case (they didn't exist in Java when this code was created). However, there are other references to those constants in the project. Before I can actually merge, could you please update them as well (and ensure the code properly builds?). Thank you!

chesterbr avatar Jul 04 '17 00:07 chesterbr

Another thing: the original list of ordered "naipes" (card suits, in Portuguese) did not include "nenhum" (none, in Portuguese). Is this inclusion affecting the gameplay?

chesterbr avatar Jul 06 '17 19:07 chesterbr

Hi, the inclusion of none(nenhum) in the enum doesnt affect the gameplay, the logic is still the same. I updated the other files too.

somalieca avatar Jul 08 '17 20:07 somalieca

This became out of sync with the big changes introduced lately, so I'll close for now. Thank you for PR-ing 🙇

chesterbr avatar Feb 14 '23 23:02 chesterbr