public class FireTorpedoCommand extends ShipCommand
| Constructor and Description |
|---|
FireTorpedoCommand(char direction)
Creates a command to fire a torpedo.
|
| Modifier and Type | Method and Description |
|---|---|
static boolean |
executesImmediately()
Fire Torpedo executes immediately with a cooldown of 0.2 seconds.
|
static int |
getInitialEnergyCost()
Gets the one-time energy cost to initiate this command.
|
java.lang.String |
getName() |
equals, getMessage, getOngoingEnergyCost, isBlocking, toStringpublic FireTorpedoCommand(char direction)
direction - which launcher to fire from ('F' for front, 'B' for back)public java.lang.String getName()
getName in class ShipCommandpublic static int getInitialEnergyCost()
public static boolean executesImmediately()