Skip to content

Instantly share code, notes, and snippets.

@joshiraez
Created January 1, 2020 04:31
Show Gist options
  • Save joshiraez/c2fa49fcefeb41b5a0e6a9ff7d44dda8 to your computer and use it in GitHub Desktop.
Save joshiraez/c2fa49fcefeb41b5a0e6a9ff7d44dda8 to your computer and use it in GitHub Desktop.
Creating Data classes interfaces. Rethinking interfaces in medium
class CharacterData {
int HP;
int attack;
int defense;
//Implement all the boilerplate :D
}
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