Skip to content

Commit

Permalink
fixed -= misuse
Browse files Browse the repository at this point in the history
  • Loading branch information
unknown authored and unknown committed Oct 11, 2023
1 parent 97adf58 commit 97b65fc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/hu/bme/mit/spaceship/TorpedoStore.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public boolean fire(int numberOfTorpedos){

if (r >= FAILURE_RATE) {
// successful firing
this.torpedoCount =- numberOfTorpedos;
this.torpedoCount -= numberOfTorpedos;
success = true;
} else {
// simulated failure
Expand Down

0 comments on commit 97b65fc

Please sign in to comment.