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> { ...@@ -37,7 +37,7 @@ public class AuctionCommandExecutorFire extends CommandExecutor<CommandFire> {
} }
@Override @Override
public CommandExecutor updateInfo(MessageManager messageManager) { public CommandExecutor<CommandFire> updateInfo(MessageManager messageManager) {
super.updateInfo(messageManager); super.updateInfo(messageManager);
// FireStationから受信したMessageCivilianを収集 // FireStationから受信したMessageCivilianを収集
...@@ -69,13 +69,13 @@ public class AuctionCommandExecutorFire extends CommandExecutor<CommandFire> { ...@@ -69,13 +69,13 @@ public class AuctionCommandExecutorFire extends CommandExecutor<CommandFire> {
} }
@Override @Override
public CommandExecutor setCommand(CommandFire command) { public CommandExecutor<CommandFire> setCommand(CommandFire command) {
// TODO // TODO
return this; return this;
} }
@Override @Override
public CommandExecutor calc() { public CommandExecutor<CommandFire> calc() {
// TODO // TODO
return this; return this;
} }
...@@ -88,10 +88,9 @@ public class AuctionCommandExecutorFire extends CommandExecutor<CommandFire> { ...@@ -88,10 +88,9 @@ public class AuctionCommandExecutorFire extends CommandExecutor<CommandFire> {
private boolean isValidHuman(StandardEntity entity) { private boolean isValidHuman(StandardEntity entity) {
if (entity == null) if (entity == null)
return false; return false;
if (!(entity instanceof Human)) if (!(entity instanceof Human target))
return false; return false;
Human target = (Human) entity;
if (!target.isHPDefined() || target.getHP() == 0) if (!target.isHPDefined() || target.getHP() == 0)
return false; return false;
if (!target.isPositionDefined()) if (!target.isPositionDefined())
...@@ -106,10 +105,7 @@ public class AuctionCommandExecutorFire extends CommandExecutor<CommandFire> { ...@@ -106,10 +105,7 @@ public class AuctionCommandExecutorFire extends CommandExecutor<CommandFire> {
return false; return false;
StandardEntityURN positionURN = position.getStandardURN(); StandardEntityURN positionURN = position.getStandardURN();
if (positionURN == REFUGE || positionURN == AMBULANCE_TEAM) return positionURN != REFUGE && positionURN != AMBULANCE_TEAM;
return false;
return true;
} }
/** /**
...@@ -133,9 +129,6 @@ public class AuctionCommandExecutorFire extends CommandExecutor<CommandFire> { ...@@ -133,9 +129,6 @@ public class AuctionCommandExecutorFire extends CommandExecutor<CommandFire> {
return false; return false;
final Human targetHuman = (Human) targetEntity; final Human targetHuman = (Human) targetEntity;
if (targetHuman.getBuriedness() <= 0) return targetHuman.getBuriedness() > 0;
return false;
return true;
} }
} }
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