Skip to content

Commit a952106

Browse files
Wizards and warriors: more generic param names for #damagePoints (exercism#2308)
Within the context of the exercise, using explicit names for the Fighter params to #damagePoints is correct, but it seems overly specific given the topic being introduced is inheritance and only knowing the argument is of type Fighter is sufficient. Co-authored-by: Sander Ploegsma <sanderploegsma@gmail.com>
1 parent e06ba5c commit a952106

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • exercises/concept/wizards-and-warriors/src/main/java

exercises/concept/wizards-and-warriors/src/main/java/Fighter.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public String toString() {
1616
}
1717

1818
@Override
19-
int damagePoints(Fighter wizard) {
19+
int damagePoints(Fighter fighter) {
2020
throw new UnsupportedOperationException("Please implement Warrior.damagePoints() method");
2121
}
2222
}
@@ -29,7 +29,7 @@ boolean isVulnerable() {
2929
}
3030

3131
@Override
32-
int damagePoints(Fighter warrior) {
32+
int damagePoints(Fighter fighter) {
3333
throw new UnsupportedOperationException("Please implement Wizard.damagePoints() method");
3434
}
3535

0 commit comments

Comments
 (0)