diff --git a/src/main/java/hu/bme/mit/spaceship/GT4500.java b/src/main/java/hu/bme/mit/spaceship/GT4500.java index 15b09a7..c6a8837 100644 --- a/src/main/java/hu/bme/mit/spaceship/GT4500.java +++ b/src/main/java/hu/bme/mit/spaceship/GT4500.java @@ -1,7 +1,7 @@ package hu.bme.mit.spaceship; /** -* A simple spaceship with two proton torpedos and four lasers +* A simple spaceship with two proton torpedo stores and four lasers */ public class GT4500 implements SpaceShip { @@ -27,14 +27,14 @@ public boolean fireLaser(FiringMode firingMode) { * SINGLE: fires only one of the bays. * - For the first time the primary store is fired. * - To give some cooling time to the torpedo stores, torpedo stores are fired alternating. - * - But if the store next in line is empty the ship tries to fire the other store. + * - But if the store next in line is empty, the ship tries to fire the other store. * - If the fired store reports a failure, the ship does not try to fire the other one. * ALL: tries to fire both of the torpedo stores. * * @return whether at least one torpedo was fired successfully */ @Override - public boolean fireTorpedos(FiringMode firingMode) { + public boolean fireTorpedo(FiringMode firingMode) { boolean firingSuccess = false; @@ -77,7 +77,7 @@ public boolean fireTorpedos(FiringMode firingMode) { break; case ALL: - // try to fire both of the torpedos + // try to fire both of the torpedo stores //TODO implement feature break; diff --git a/src/main/java/hu/bme/mit/spaceship/SpaceShip.java b/src/main/java/hu/bme/mit/spaceship/SpaceShip.java index dece4ae..68af3b5 100644 --- a/src/main/java/hu/bme/mit/spaceship/SpaceShip.java +++ b/src/main/java/hu/bme/mit/spaceship/SpaceShip.java @@ -15,10 +15,10 @@ public interface SpaceShip { public boolean fireLaser(FiringMode firingMode); /** - * Fires the torpedos of the ship + * Fires the torpedo stores of the ship * - * @param firingMode how many torpedo bays to fire + * @param firingMode how many torpedo stores to fire * @return whether the fire command was successful */ - public boolean fireTorpedos(FiringMode firingMode); + public boolean fireTorpedo(FiringMode firingMode); } diff --git a/src/main/java/hu/bme/mit/spaceship/TorpedoStore.java b/src/main/java/hu/bme/mit/spaceship/TorpedoStore.java index 77aa777..654200b 100644 --- a/src/main/java/hu/bme/mit/spaceship/TorpedoStore.java +++ b/src/main/java/hu/bme/mit/spaceship/TorpedoStore.java @@ -3,7 +3,7 @@ import java.util.Random; /** -* Class storing and managing the torpedos of a ship +* Class storing and managing the torpedoes of a ship */ public class TorpedoStore { diff --git a/src/test/java/hu/bme/mit/spaceship/GT4500Test.java b/src/test/java/hu/bme/mit/spaceship/GT4500Test.java index 826f2a7..90bdc6f 100644 --- a/src/test/java/hu/bme/mit/spaceship/GT4500Test.java +++ b/src/test/java/hu/bme/mit/spaceship/GT4500Test.java @@ -16,22 +16,22 @@ public void init(){ } @Test - public void fireTorpedos_Single_Success(){ + public void fireTorpedo_Single_Success(){ // Arrange // Act - boolean result = ship.fireTorpedos(FiringMode.SINGLE); + boolean result = ship.fireTorpedo(FiringMode.SINGLE); // Assert assertEquals(true, result); } @Test - public void fireTorpedos_All_Success(){ + public void fireTorpedo_All_Success(){ // Arrange // Act - boolean result = ship.fireTorpedos(FiringMode.ALL); + boolean result = ship.fireTorpedo(FiringMode.ALL); // Assert assertEquals(true, result);