summaryrefslogtreecommitdiffstats
path: root/src/de/fhswf/in/inf/java1/aufgabe8/LottoZiehungMain.java
diff options
context:
space:
mode:
authorStefan Suhren <suhren.stefan@fh-swf.de>2014-11-24 23:29:16 +0100
committerStefan Suhren <suhren.stefan@fh-swf.de>2014-11-24 23:29:16 +0100
commit699e0b41e966dc92bc90c49bdb32f2f71fd05309 (patch)
tree06847d2dcf9313ec98eec33bb0f167bb8c06c862 /src/de/fhswf/in/inf/java1/aufgabe8/LottoZiehungMain.java
parentb5dafd428e5a48ab950caf498c5de752ec30c3c1 (diff)
downloadJava1-699e0b41e966dc92bc90c49bdb32f2f71fd05309.tar.gz
Java1-699e0b41e966dc92bc90c49bdb32f2f71fd05309.zip
Assignment No.8 added the lottery class.
Diffstat (limited to 'src/de/fhswf/in/inf/java1/aufgabe8/LottoZiehungMain.java')
-rw-r--r--src/de/fhswf/in/inf/java1/aufgabe8/LottoZiehungMain.java22
1 files changed, 6 insertions, 16 deletions
diff --git a/src/de/fhswf/in/inf/java1/aufgabe8/LottoZiehungMain.java b/src/de/fhswf/in/inf/java1/aufgabe8/LottoZiehungMain.java
index 6524a29..9c9cffe 100644
--- a/src/de/fhswf/in/inf/java1/aufgabe8/LottoZiehungMain.java
+++ b/src/de/fhswf/in/inf/java1/aufgabe8/LottoZiehungMain.java
@@ -3,7 +3,6 @@
*/
package de.fhswf.in.inf.java1.aufgabe8;
-import java.util.ArrayList;
import java.util.List;
/**
@@ -31,21 +30,12 @@ public final class LottoZiehungMain
*/
public static void main(String[] args)
{
- List<Integer> lottoZahlen = new ArrayList<>(49);
+ Lottery6OutOf49 spiel = new Lottery6OutOf49();
+
+ List<Integer> ziehung = spiel.getLastDraw();
+
+ Integer sonderzahl = spiel.getSuperzahl();
- for (int i = 1; i <= 49; i++)
- {
- lottoZahlen.add(i);
- }
-
- List<Integer> ziehung = FloydAndBentley.sample(lottoZahlen, 7);
-
- Integer Sonderzahl = ziehung.get(6);
-
- ziehung.remove(6);
-
- ziehung.sort(null);
-
- System.out.println(ziehung + " SonderZahl: " + Sonderzahl);
+ System.out.println(ziehung + " SonderZahl: " + sonderzahl);
}
}