Created
January 1, 2020 04:31
-
-
Save joshiraez/c2fa49fcefeb41b5a0e6a9ff7d44dda8 to your computer and use it in GitHub Desktop.
Creating Data classes interfaces. Rethinking interfaces in medium
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class CharacterData { | |
int HP; | |
int attack; | |
int defense; | |
//Implement all the boilerplate :D | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class CharacterDataWithSuppliers { | |
Supplier<Integer> HP; | |
Supplier<Integer> attack; | |
Supplier<Integer> defeense; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment