<commit_before>package Visual;

import Console.ConsoleFrame;
import Constants.PathConstants;
import Engine.Bullet;
import Engine.Tank;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Image;
import java.awt.RenderingHints;
import java.io.File;
import java.io.IOException;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
import javax.imageio.ImageIO;

/**
 *
 * @author Liviu
 */
public class VisualPanel extends javax.swing.JPanel {

    private long lastTime, totalTime, frames, totalFrames;
    Animator animator;
    List<Tank> tanks = Collections.synchronizedList(new LinkedList<Tank>());
    final List<Bullet> bullets = Collections.synchronizedList(new LinkedList<Bullet>());
    
    /**
     * Creates new form VisualPanel
     */ 
    public static Image tankSprite, cannonSprite, bulletSprite;
    
    public VisualPanel() {
        initComponents();
        
        try {
            tankSprite = ImageIO.read(new File(PathConstants.TANK_BODY_SPRITE_PATH));
            cannonSprite = ImageIO.read(new File(PathConstants.TANK_CANNON_SPRITE_PATH));
            bulletSprite = ImageIO.read(new File(PathConstants.BULLET_SPRITE_PATH));
        } catch (IOException ex) {
            ConsoleFrame.sendMessage("VisualPanel", "Failed to get sprites");
        }

        for(int i = 0; i<50; i++)
        tanks.add(new Tank(Math.random()*1000%Constants.VisualConstants.ENGINE_WIDTH, 
                Math.random()*1000%Constants.VisualConstants.ENGINE_HEIGHT, 2, 100, 0, 100,"Tank1", tankSprite, cannonSprite));

        
        for(Tank aux:tanks){
            System.out.println(aux);
        }
        
        animator = new Animator(this, tanks, bullets);
    }
    
    @Override
    public void paintComponent(Graphics g){
        g.setColor(Color.CYAN);
        g.fillRect(0, 0, this.getWidth(), this.getHeight());<commit_msg>Changed number of spawned tanks to 20<commit_after>package Visual;

import Console.ConsoleFrame;
import Constants.PathConstants;
import Engine.Bullet;
import Engine.Tank;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Image;
import java.awt.RenderingHints;
import java.io.File;
import java.io.IOException;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
import javax.imageio.ImageIO;

/**
 *
 * @author Liviu
 */
public class VisualPanel extends javax.swing.JPanel {

    private long lastTime, totalTime, frames, totalFrames;
    Animator animator;
    List<Tank> tanks = Collections.synchronizedList(new LinkedList<Tank>());
    final List<Bullet> bullets = Collections.synchronizedList(new LinkedList<Bullet>());
    
    /**
     * Creates new form VisualPanel
     */ 
    public static Image tankSprite, cannonSprite, bulletSprite;
    
    public VisualPanel() {
        initComponents();
        
        try {
            tankSprite = ImageIO.read(new File(PathConstants.TANK_BODY_SPRITE_PATH));
            cannonSprite = ImageIO.read(new File(PathConstants.TANK_CANNON_SPRITE_PATH));
            bulletSprite = ImageIO.read(new File(PathConstants.BULLET_SPRITE_PATH));
        } catch (IOException ex) {
            ConsoleFrame.sendMessage("VisualPanel", "Failed to get sprites");
        }

        for(int i = 0; i<20; i++)
        tanks.add(new Tank(Math.random()*1000%Constants.VisualConstants.ENGINE_WIDTH, 
                Math.random()*1000%Constants.VisualConstants.ENGINE_HEIGHT, 2, 100, 0, 100,"Tank1", tankSprite, cannonSprite));

        
        for(Tank aux:tanks){
            System.out.println(aux);
        }
        
        animator = new Animator(this, tanks, bullets);
    }
    
    @Override
    public void paintComponent(Graphics g){
        g.setColor(Color.CYAN);
        g.fillRect(0, 0, this.getWidth(), this.getHeight());
{'fraction_non_alphanumeric': 0.11077080142930067, 'fraction_numerical': 0.01225114854517611, 'mean_word_length': 3.1824973319103522, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 11, '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': '820696', 'n_tokens_mistral': 1232, 'n_tokens_neox': 1191, 'n_words': 247}