Skip to content

Commit

Permalink
fixing minor issues2
Browse files Browse the repository at this point in the history
  • Loading branch information
marcigo36 committed Apr 7, 2017
1 parent 7008e24 commit aeba1c9
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 additions & 4 deletions src/main/java/hu/bme/mit/spaceship/GT4500.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,8 @@ public GT4500() {
this.secondaryTorpedoStore = new TorpedoStore(10);
}

return false;
}

private static final boolean fireSingle() {
private final boolean fireSingle() {
boolean firingSuccess = false;
if (wasPrimaryFiredLast) {
// try to fire the secondary first
Expand Down Expand Up @@ -86,10 +84,28 @@ public boolean fireTorpedos(FiringMode firingMode) {
& primaryTorpedoStore.fire(primaryTorpedoStore.getNumberOfTorpedos());

break;
default: throw new Exception("Die :)");
}

return firingSuccess;
}

public boolean fireLasers(FiringMode firingMode) {

boolean firingSuccess = false;

if(firingMode == FiringMode.SINGLE)
{
//no lasers
firingSuccess = false;
}
else if(firingMode == FiringMode.ALL)
{
//no lasrs
firingSuccess = false;
}


return firingSuccess;
}

}

0 comments on commit aeba1c9

Please sign in to comment.