<commit_before>/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package mo.losowosc;

import java.awt.BasicStroke;
import java.awt.Color;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.Arrays;
import javax.swing.JPanel;
import javax.swing.Timer;

class Los extends JPanel implements ActionListener {

    private final int DELAY = 550;
    private Timer timer;
    private static long MOD = Long.MAX_VALUE;
    private Generator generator;

    public Los(int a, int b, int n, int generatorNumber) {
        switch (generatorNumber) {
            case 1:
                generator = new Generator(a, b, n, MOD);
                break;
            case 2:
                generator = new GeneratorGausowski(a, b, n, MOD);
                break;
            case 3:
                generator = new GeneratorLevyego(a, b, n, MOD);
                break;
            default:
                System.out.println("Nie ma takiego generatora!");
        }

        initTimer();
    }

    private void initTimer() {

        timer = new Timer(DELAY, this);
        timer.start();
    }

    public Timer getTimer() {
        return timer;
    }

    private void doDrawing(Graphics g) {<commit_msg>- tworzenie Menu głównego,  - buttony do uruchomienia algorytmow<commit_after>/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package mo.losowosc;

import java.awt.BasicStroke;
import java.awt.Color;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.Arrays;
import javax.swing.JPanel;
import javax.swing.Timer;

class Los extends JPanel implements ActionListener {

    private final int DELAY = 550;
    private Timer timer;
    private static long MOD = Long.MAX_VALUE;
    private Generator generator;

    public Los(int a, int b, int n, int generatorNumber) {
        switch (generatorNumber) {
            case 1: // generator pseudolosyw
                generator = new Generator(a, b, n, MOD);
                break;
            case 2: // gausowski
                generator = new GeneratorGausowski(a, b, n, MOD);
                break;
            case 3: // levyego
                generator = new GeneratorLevyego(a, b, n, MOD);
                break;
            default:
                System.out.println("Nie ma takiego generatora!");
        }

        initTimer();
    }

    private void initTimer() {

        timer = new Timer(DELAY, this);
        timer.start();
    }

    public Timer getTimer() {
        return timer;
    }

    private void doDrawing(Graphics g) {
{'fraction_non_alphanumeric': 0.08791581805838425, 'fraction_numerical': 0.0047522063815342835, 'mean_word_length': 2.2278203723986856, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5195273', 'n_tokens_mistral': 855, 'n_tokens_neox': 810, 'n_words': 271}