fixed typo

This commit is contained in:
2021-04-13 14:14:09 +02:00
parent 2473c31367
commit a4fb0d7478
+4 -4
View File
@@ -183,7 +183,7 @@ public class Raumschiff {
System.out.println("huelleInProzent: " + this.huelleInProzent); System.out.println("huelleInProzent: " + this.huelleInProzent);
System.out.println("lebenserhaltungssystemeInProzent: " + this.lebenserhaltungssystemeInProzent); System.out.println("lebenserhaltungssystemeInProzent: " + this.lebenserhaltungssystemeInProzent);
System.out.println("androidenAnzahl: " + this.androidenAnzahl); System.out.println("androidenAnzahl: " + this.androidenAnzahl);
System.out.println(""); System.out.println();
} }
public void ladungsverzeichnisAusgeben() { public void ladungsverzeichnisAusgeben() {
@@ -194,7 +194,7 @@ public class Raumschiff {
System.out.println("Menge: " + ladung.getMenge()); System.out.println("Menge: " + ladung.getMenge());
System.out.println("============================================"); System.out.println("============================================");
} }
System.out.println(""); System.out.println();
} }
public void ladungsverzeichnisAufraeumen() { public void ladungsverzeichnisAufraeumen() {
@@ -204,7 +204,7 @@ public class Raumschiff {
public int ladungPhotonentorpedosAnzahl() { public int ladungPhotonentorpedosAnzahl() {
int anzahl = 0; int anzahl = 0;
for (Ladung ladung : this.ladungsverzeichnis) { for (Ladung ladung : this.ladungsverzeichnis) {
if (ladung.getBezeichnung().equalsIgnoreCase("photonentorpedos")) anzahl += ladung.getMenge(); if (ladung.getBezeichnung().equalsIgnoreCase("photonentorpedo")) anzahl += ladung.getMenge();
} }
return anzahl; return anzahl;
} }
@@ -212,7 +212,7 @@ public class Raumschiff {
public void ladungPhotonentorpedoVermindern(int anzahl) { public void ladungPhotonentorpedoVermindern(int anzahl) {
int tempToRemove; int tempToRemove;
for (Ladung ladung : this.ladungsverzeichnis) { for (Ladung ladung : this.ladungsverzeichnis) {
if (ladung.getBezeichnung().equalsIgnoreCase("photonentorpedos") && anzahl > 0) { if (ladung.getBezeichnung().equalsIgnoreCase("photonentorpedo") && anzahl > 0) {
if (ladung.getMenge() < anzahl) { if (ladung.getMenge() < anzahl) {
tempToRemove = ladung.getMenge(); tempToRemove = ladung.getMenge();
anzahl -= tempToRemove; anzahl -= tempToRemove;