<commit_before>import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.awt.event.MouseMotionListener;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;

import javax.imageio.ImageIO;
import javax.swing.JFrame;


public class Menu implements MouseListener, MouseMotionListener {
	
	private TekenaarMenu t;
	private ArrayList<Rand> menuknoppen;
	private ArrayList<Rand> randen;
	private Achtergrond bg;
	private BufferedImage image;
	private JFrame scherm;
	
	public Menu() {
		image = laadPlaatje("background.jpg");
		bg = new Achtergrond(image, 0, 0, 1750, 750);
		
		menuknoppen = new ArrayList<Rand>();
		randen = new ArrayList<Rand>();
		
		image = laadPlaatje("world1.png");
		menuknoppen.add(new Rand(image, 430, 200, 140, 50));
		
		image = laadPlaatje("world2.png");
		menuknoppen.add(new Rand(image, 430, 275, 140, 50));
		
		image = laadPlaatje("world3.png");
		menuknoppen.add(new Rand(image, 430, 350, 140, 50));
		
		image = laadPlaatje("logo.gif");
		randen.add(new Rand(image, 325, 25, 350, 138));
		
		image = laadPlaatje("copyright.png");
		randen.add(new Rand(image, 335, 425, 330, 50));
		
		scherm = new JFrame("Mario (Menu) - <NAME>");
		scherm.setBounds(0, 0, 1000, 600);
		scherm.setLayout(null);
		
		t = new TekenaarMenu(bg, menuknoppen, randen);
		t.setBounds(0, 0, 1000, 600);		
		scherm.add(t);
		
		
		scherm.setVisible(true);
		scherm.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		
		t.addMouseListener(this);
		t.addMouseMotionListener(this);
		
		
	}

	public void mouseDragged(MouseEvent e) {
		
	}


	public void mouseMoved(MouseEvent e) {
		
	}


	public void mouseClicked(MouseEvent e) {
	}
<commit_msg>17-4 Niek<commit_after>import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.awt.event.MouseMotionListener;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;

import javax.imageio.ImageIO;
import javax.swing.JFrame;


public class Menu implements MouseListener, MouseMotionListener {
	
	private TekenaarMenu t;
	private ArrayList<Rand> menuknoppen;
	private ArrayList<Rand> randen;
	private Achtergrond bg;
	private BufferedImage image;
	private JFrame scherm;
	private int vx = -1;
	
	public Menu() {
		image = laadPlaatje("background.jpg");
		bg = new Achtergrond(image, 0, 0, 1750, 750);
		
		menuknoppen = new ArrayList<Rand>();
		randen = new ArrayList<Rand>();
		
		image = laadPlaatje("world1.png");
		menuknoppen.add(new Rand(image, 430, 200, 140, 50));
		
		image = laadPlaatje("world2.png");
		menuknoppen.add(new Rand(image, 430, 275, 140, 50));
		
		image = laadPlaatje("world3.png");
		menuknoppen.add(new Rand(image, 430, 350, 140, 50));
		
		image = laadPlaatje("logo.gif");
		randen.add(new Rand(image, 325, 25, 350, 138));
		
		image = laadPlaatje("copyright.png");
		randen.add(new Rand(image, 335, 425, 330, 50));
		
		scherm = new JFrame("Mario (Menu) - <NAME>");
		scherm.setBounds(0, 0, 1000, 600);
		scherm.setLayout(null);
		
		t = new TekenaarMenu(bg, menuknoppen, randen);
		t.setBounds(0, 0, 1000, 600);		
		scherm.add(t);
		
		
		scherm.setVisible(true);
		scherm.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		
		t.addMouseListener(this);
		t.addMouseMotionListener(this);
		
		
		while (true){
			try{
				Thread.sleep(20);
			}
			catch(InterruptedException e) {
				e.printStackTrace();
			}
			
			bg.x = bg.x + vx;
			if(scherm.getWidth() >= (bg.breedte + bg.x) || bg.x > 0 ) { //Bewegende achtergrond omdraaien
				vx = -vx;
			}
			scherm.repaint();
		}
	}

	public void mouseDragged(MouseEvent e) {
		
	}


	public void mouseMoved(MouseEvent e) {
		
	}


	public void mouseClicked(MouseEvent e) {
	}

{'fraction_non_alphanumeric': 0.13648433351035583, 'fraction_numerical': 0.04699946893255443, 'mean_word_length': 4.083670715249663, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 15, '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': '6049435', 'n_tokens_mistral': 1731, 'n_tokens_neox': 1378, 'n_words': 296}