diff options
| author | Stefan Suhren <suhren.stefan@fh-swf.de> | 2014-11-13 22:56:15 +0100 |
|---|---|---|
| committer | Stefan Suhren <suhren.stefan@fh-swf.de> | 2014-11-13 22:56:15 +0100 |
| commit | 88c2ca8dcc9e5351d34fa9110434ab7fd01e88af (patch) | |
| tree | 080f68127c56060ee8abbbb44ebeb0d3808696ef /src/de/fhswf/in/inf | |
| parent | 0a17d5dd687ced4dd501097e6d15376ccbb8b281 (diff) | |
| download | Java1-88c2ca8dcc9e5351d34fa9110434ab7fd01e88af.tar.gz Java1-88c2ca8dcc9e5351d34fa9110434ab7fd01e88af.zip | |
Assignment No.7 now with english comments
Diffstat (limited to 'src/de/fhswf/in/inf')
| -rw-r--r-- | src/de/fhswf/in/inf/java1/aufgabe7/Simulation.java | 6 | ||||
| -rw-r--r-- | src/de/fhswf/in/inf/java1/aufgabe7/Spiel.java | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/de/fhswf/in/inf/java1/aufgabe7/Simulation.java b/src/de/fhswf/in/inf/java1/aufgabe7/Simulation.java index 1b42f69..71e23a0 100644 --- a/src/de/fhswf/in/inf/java1/aufgabe7/Simulation.java +++ b/src/de/fhswf/in/inf/java1/aufgabe7/Simulation.java @@ -27,7 +27,7 @@ public final class Simulation * * @param anzahl * How often the game will be run. - * @return Gewonnene Spiele. + * @return Victory count */ private static int nDurchlaufeAusfuehren(Spiel spiel, Spieler spieler, int anzahl) @@ -65,8 +65,8 @@ public final class Simulation public static void main(String[] args) { - Spieler[] spieler = { new GleichSpieler(), new WechselSpieler(), - new ZufallsSpieler(0.5) }; + Spieler[] spieler = {new GleichSpieler(), new WechselSpieler(), + new ZufallsSpieler(0.5)}; Spiel spiel = new Spiel(); diff --git a/src/de/fhswf/in/inf/java1/aufgabe7/Spiel.java b/src/de/fhswf/in/inf/java1/aufgabe7/Spiel.java index 1954a8c..f33e031 100644 --- a/src/de/fhswf/in/inf/java1/aufgabe7/Spiel.java +++ b/src/de/fhswf/in/inf/java1/aufgabe7/Spiel.java @@ -39,7 +39,7 @@ public class Spiel { if (ersterTipp < 0 || ersterTipp > MAXHUET) { - throw new IllegalArgumentException("Tip liegt nicht im Bereich."); + throw new IllegalArgumentException("Tip outside of boundaries."); } int erg = -1; if (ersterTipp != nussPlatz) @@ -70,7 +70,7 @@ public class Spiel * The player who plays. * @return Boolean, if the player choose correct. */ - public boolean spielDurchlauf(Spieler spieler) + public final boolean spielDurchlauf(Spieler spieler) { if (spieler == null) { |
