Skip to content

Commit

Permalink
iluwatar#88 Fixed intellij warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeremy-Cains-ANU committed Oct 27, 2022
1 parent f6f0eef commit a88e521
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
13 changes: 4 additions & 9 deletions facet/README.md
Expand Up @@ -90,21 +90,16 @@ public class Dragon {
int facetedGetHealth() {
return health;
}

void setHealth(int health) {
this.health = health;
}

void facetedReceiveAttack(Attack attack) {
switch (attack) {
case ARROW:
health -= 10;
break;
case WATER_PISTOL:
health -= 15;
break;
default:
health -= 5;
case ARROW -> health -= 10;
case WATER_PISTOL -> health -= 15;
default -> health -= 5;
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions facet/src/main/java/com/iluwatar/facet/Knight.java
Expand Up @@ -11,8 +11,8 @@
@Slf4j
public class Knight {
private final String name;
private Attack attack;
private DragonFacet dragonFacet;
private final Attack attack;
private final DragonFacet dragonFacet;

/**
* Simple constructor for a Knight.
Expand Down

0 comments on commit a88e521

Please sign in to comment.