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

Extend List instead of composing list #4

Closed
yonasadiel opened this issue Apr 1, 2020 · 1 comment
Closed

Extend List instead of composing list #4

yonasadiel opened this issue Apr 1, 2020 · 1 comment

Comments

@yonasadiel
Copy link
Collaborator

This Hand and Deck is basically a list of Card. Some methods like contain, getSize, etc have already been defined in Java List Interface. Why don't we create class Hand extends ArrayList instead?

https://github.com/William9923/CardGameOOP/blob/2fc745ec072ade073f5a9d2a06789045347dff5e/src/main/java/com/avatarduel/model/Hand.java#L7-L22

https://github.com/William9923/CardGameOOP/blob/2fc745ec072ade073f5a9d2a06789045347dff5e/src/main/java/com/avatarduel/model/Deck.java#L7-L20

This issue is only a suggestion. You may ignore it (not all the suggestions are true), challenge it, or come up with another idea yourself.

@William9923
Copy link
Owner

fixed

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

No branches or pull requests

2 participants