Browse Source

Draft2

JensV2
Jens Schuhmann 1 year ago
parent
commit
50deb6c1c9
2 changed files with 5 additions and 6 deletions
  1. 3
    3
      src/bandit/Model/Wuerfel.java
  2. 2
    3
      src/bandit/Model/Zahlengenerator.java

src/bandit/Model/Generator/Generator1.java → src/bandit/Model/Wuerfel.java View File

* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
*/ */


package bandit.Model.Generator;
package bandit.Model;


import bandit.Model.Zahlengenerator; import bandit.Model.Zahlengenerator;
import java.util.concurrent.ExecutorService; import java.util.concurrent.ExecutorService;
* *
* @author le * @author le
*/ */
public class Generator1 implements Runnable // Callable
public class Wuerfel implements Runnable // Callable
{ {
private static Logger lg = OhmLogger.getLogger(); //Logger sollten immer static sein da sie für alle instanzen loggs ausführen private static Logger lg = OhmLogger.getLogger(); //Logger sollten immer static sein da sie für alle instanzen loggs ausführen
private SubmissionPublisher<Integer> wertPublisher; private SubmissionPublisher<Integer> wertPublisher;
public Generator1(Zahlengenerator hauptgenerator)
public Wuerfel(Zahlengenerator hauptgenerator)
{ {
wert = 0; wert = 0;



+ 2
- 3
src/bandit/Model/Zahlengenerator.java View File



package bandit.Model; package bandit.Model;


import bandit.Model.Generator.Generator1;
//import bandit.Model.Generator.Generator2; //import bandit.Model.Generator.Generator2;
//import bandit.Model.Generator.Generator3; //import bandit.Model.Generator.Generator3;
import java.util.concurrent.ExecutorService; import java.util.concurrent.ExecutorService;
private Flow.Subscription subscription; private Flow.Subscription subscription;
private SubmissionPublisher<Integer> wertPublisher; private SubmissionPublisher<Integer> wertPublisher;


private Generator1 generator1;
private Wuerfel generator1;
private Thread thd1; private Thread thd1;
// private Generator2 generator2; // private Generator2 generator2;
public Zahlengenerator() public Zahlengenerator()
{ {
wertPublisher = new SubmissionPublisher<>(); wertPublisher = new SubmissionPublisher<>();
generator1 = new Generator1(this);
generator1 = new Wuerfel(this);
// generator2 = new Generator2(this); // generator2 = new Generator2(this);
// generator3 = new Generator3(this); // generator3 = new Generator3(this);



Loading…
Cancel
Save