<commit_before>package com.cdm.view.elements;

import java.util.Arrays;
import java.util.List;

import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.math.Vector3;
import com.cdm.gui.effects.SoundFX;
import com.cdm.gui.effects.SoundFX.Type;
import com.cdm.view.IRenderer;
import com.cdm.view.Position;
import com.cdm.view.elements.shots.DisplayEffect;
import com.cdm.view.elements.shots.StunRay;
import com.cdm.view.enemy.EnemyUnit;

public class Stunner extends RotatingUnit implements Element {

	private List<Vector3> lines;
	private List<Vector3> poly;
	float shotFrequency = 2.5f;
	float lastShot = 0.0f;
	float maxDist = 3.0f;
	DisplayEffect currentShot = null;
	Color innerColor = new Color(0, 0, 0.6f, 1.0f);
	Color outerColor = new Color(0.2f, 0.2f, 1.0f, 1.0f);

	public Stunner(Position p) {
		super(p);
		Vector3 a = new Vector3(-0.95f, 0.25f, 0);
		Vector3 b = new Vector3(-0.25f, 0.75f, 0);
		Vector3 c = new Vector3(0.25f, 0.75f, 0);
		Vector3 d = new Vector3(0.85f, 0.25f, 0);
		Vector3 d2 = new Vector3(0.85f, -0.25f, 0);
		Vector3 e = new Vector3(0.25f, -0.75f, 0);
		Vector3 f = new Vector3(-0.25f, -0.75f, 0);
		Vector3 g = new Vector3(-0.95f, -0.25f, 0);
		Vector3 h = new Vector3(-0.5f, -0.25f, 0);
		Vector3 i = new Vector3(-0.5f, 0.25f, 0);

		lines = Arrays.asList(new Vector3[] { a, b, b, c, c, d, d, d2, d2, e,
				e, f, f, g, g, h, h, i, i, a });
		poly = Arrays.asList(new Vector3[] { a, b, c, a, c, d, i, d, h, d, h,
				d2, g, f, d2, f, d2, e });
		setTurningSpeed(15.0f);
	}

	@Override
	public void draw(IRenderer renderer) {
		renderer.drawPoly(getPosition(), poly, getAngle(), innerColor,
				getSize());
		renderer.drawLines(getPosition(), lines, getAngle(), outerColor,
				getSize());
	}

	void shoot(EnemyUnit enemy) {
		if (enemy != null) {

			if (lastShot > shotFrequency) {<commit_msg>stunner appearance modified<commit_after>package com.cdm.view.elements;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.math.Vector3;
import com.cdm.gui.effects.SoundFX;
import com.cdm.gui.effects.SoundFX.Type;
import com.cdm.view.IRenderer;
import com.cdm.view.Position;
import com.cdm.view.elements.shots.DisplayEffect;
import com.cdm.view.elements.shots.StunRay;
import com.cdm.view.enemy.EnemyUnit;

public class Stunner extends RotatingUnit implements Element {

	private static List<Vector3> lines = null;
	private static List<Vector3> poly = null;
	float shotFrequency = 2.5f;
	float lastShot = 0.0f;
	float maxDist = 3.0f;
	DisplayEffect currentShot = null;
	Color innerColor = new Color(0, 0, 0.6f, 1.0f);
	Color outerColor = new Color(0.2f, 0.2f, 1.0f, 1.0f);

	public Stunner(Position p) {
		super(p);

		if (lines == null) {
			float r = 0.9f;
			float ir = 0.8f;
			Vector3 q0 = new Vector3(-r, -r, 0);
			Vector3 q1 = new Vector3(r, -r, 0);
			Vector3 q2 = new Vector3(r, r, 0);
			Vector3 q3 = new Vector3(-r, r, 0);

			int l = 20;
			Vector3 circle[] = new Vector3[l];
			for (int i = 0; i < l; i++) {
				float phase = 3.1415f * 2 * i / l;
				circle[i] = new Vector3((float) Math.sin(phase) * ir,
						(float) Math.cos(phase) * ir, 0);
			}

			lines = new ArrayList<Vector3>();
			
			lines.add(q0);
			lines.add(q1);
			lines.add(q1);
			lines.add(q2);
			lines.add(q2);
			lines.add(q3);
			lines.add(q3);
			lines.add(q0);
			poly = new ArrayList<Vector3>();
			for (int index = 0; index < l; index++) {
				lines.add(circle[index]);
				lines.add(circle[(index + 1) % l]);
				poly.add(circle[index]);
				poly.add(circle[(index + 1) % l]);
				poly.add(new Vector3(0, 0, 0));
			}
		}
		setTurningSpeed(15.0f);
	}

	@Override
	public void draw(IRenderer renderer) {
		renderer.drawPoly(getPosition(), poly, getAngle(), innerColor,
				getSize());
		renderer.drawLines(getPosition(), lines, getAngle(), outerColor,
				getSize());
	}

	void shoot(EnemyUnit enemy) {
		if (enemy != null) {

			if (lastShot > shotFrequency) {
{'fraction_non_alphanumeric': 0.1592564682240643, 'fraction_numerical': 0.04973624717407687, 'mean_word_length': 3.56651376146789, 'pattern_counts': {'":': 0, '<': 11, '<?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': '4996984', 'n_tokens_mistral': 1809, 'n_tokens_neox': 1593, 'n_words': 391}