Commit a0a35e7e authored by Joe Fujisawa's avatar Joe Fujisawa
Browse files

clean リファクタ

parent 04acf4c8
......@@ -37,7 +37,7 @@ public class AuctionCommandExecutorFire extends CommandExecutor<CommandFire> {
}
@Override
public CommandExecutor updateInfo(MessageManager messageManager) {
public CommandExecutor<CommandFire> updateInfo(MessageManager messageManager) {
super.updateInfo(messageManager);
// FireStationから受信したMessageCivilianを収集
......@@ -69,13 +69,13 @@ public class AuctionCommandExecutorFire extends CommandExecutor<CommandFire> {
}
@Override
public CommandExecutor setCommand(CommandFire command) {
public CommandExecutor<CommandFire> setCommand(CommandFire command) {
// TODO
return this;
}
@Override
public CommandExecutor calc() {
public CommandExecutor<CommandFire> calc() {
// TODO
return this;
}
......@@ -88,10 +88,9 @@ public class AuctionCommandExecutorFire extends CommandExecutor<CommandFire> {
private boolean isValidHuman(StandardEntity entity) {
if (entity == null)
return false;
if (!(entity instanceof Human))
if (!(entity instanceof Human target))
return false;
Human target = (Human) entity;
if (!target.isHPDefined() || target.getHP() == 0)
return false;
if (!target.isPositionDefined())
......@@ -106,10 +105,7 @@ public class AuctionCommandExecutorFire extends CommandExecutor<CommandFire> {
return false;
StandardEntityURN positionURN = position.getStandardURN();
if (positionURN == REFUGE || positionURN == AMBULANCE_TEAM)
return false;
return true;
return positionURN != REFUGE && positionURN != AMBULANCE_TEAM;
}
/**
......@@ -133,9 +129,6 @@ public class AuctionCommandExecutorFire extends CommandExecutor<CommandFire> {
return false;
final Human targetHuman = (Human) targetEntity;
if (targetHuman.getBuriedness() <= 0)
return false;
return true;
return targetHuman.getBuriedness() > 0;
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment