minitruco-android
minitruco-android copied to clipboard
Adding enumerator instead of static final integers
As stated in the book Effective Java on page 147, the use of enumerators is way better than static.
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!
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?
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.
This became out of sync with the big changes introduced lately, so I'll close for now. Thank you for PR-ing 🙇