<commit_before>package nl.mvdr.snake.ui;

import java.awt.BasicStroke;
import java.awt.Color;
import java.awt.Graphics;
import java.awt.Graphics2D;

import javax.swing.JPanel;

import nl.mvdr.snake.model.Snake;

/** Visualisation of a Snake. */
@SuppressWarnings("serial") // no serialisation
class SnakePanel extends JPanel {
    /** Adjust to see more detail. */
    private static final int ZOOM = 10;

    /** Snake to be visualised. */
    private final Snake snake;

    /**
     * Constructor.
     * 
     * @param snake
     *            snake to be visualised
     */
    SnakePanel(Snake snake) {
        super();
        this.snake = snake;
    }

    /** {@inheritDoc} */
    @Override
    protected void paintComponent(Graphics g) {

        // Simple visual for debug purposes, start from the center:
        Graphics2D g2d = (Graphics2D) g;

        g2d.setColor(Color.WHITE);
        g2d.fillRect(0, 0, getWidth(), getHeight());

        int halfWidth = getWidth() / 2;
        int halfHeight = getHeight() / 2;
        
        int cx = halfWidth - halfWidth % ZOOM;
        int cy = halfHeight - halfHeight % ZOOM;<commit_msg>Zoom out.<commit_after>package nl.mvdr.snake.ui;

import java.awt.BasicStroke;
import java.awt.Color;
import java.awt.Graphics;
import java.awt.Graphics2D;

import javax.swing.JPanel;

import nl.mvdr.snake.model.Snake;

/** Visualisation of a Snake. */
@SuppressWarnings("serial") // no serialisation
class SnakePanel extends JPanel {
    /** Adjust to see more detail. */
    private static final int ZOOM = 4;

    /** Snake to be visualised. */
    private final Snake snake;

    /**
     * Constructor.
     * 
     * @param snake
     *            snake to be visualised
     */
    SnakePanel(Snake snake) {
        super();
        this.snake = snake;
    }

    /** {@inheritDoc} */
    @Override
    protected void paintComponent(Graphics g) {

        // Simple visual for debug purposes, start from the center:
        Graphics2D g2d = (Graphics2D) g;

        g2d.setColor(Color.WHITE);
        g2d.fillRect(0, 0, getWidth(), getHeight());

        int halfWidth = getWidth() / 2;
        int halfHeight = getHeight() / 2;
        
        int cx = halfWidth - halfWidth % ZOOM;
        int cy = halfHeight - halfHeight % ZOOM;
{'fraction_non_alphanumeric': 0.1150984682713348, 'fraction_numerical': 0.010065645514223195, 'mean_word_length': 2.261055634807418, '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': '1534640', 'n_tokens_mistral': 735, 'n_tokens_neox': 716, 'n_words': 196}