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

import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.math.Vector3;
import com.cdm.view.IRenderer;
import com.cdm.view.Position;
import com.cdm.view.elements.shots.MovingShot;
import com.cdm.view.elements.units.Unit;

public abstract class EnemyUnit extends Unit {

	private static final float FREEZE_FACTOR = 0.5f;
	private static final Color BORDER_COLOR = new Color(1, 0, 0, 0.8f);
	private static final Color FILL_COLOR = new Color(1, 0, 0, 0.7f);

	private float energy = -1;
	private float orignalEnergy = -1;
	private float frozenTime = 0.0f;
	private float speed = -10.0f;
	private ShakingLines shaking = new ShakingLines();

	public EnemyUnit(Position pos) {
		super(pos);
	}

	public void setEnergy(float e) {

		if (energy < 0) {
			orignalEnergy = e;

			energy = e;
		}
	}

	public ShakingLines getShakingLines() {
		return shaking;
	}

	public abstract int getMoney();

	public abstract int getPoints();

	public abstract int getBonus();

	@Override
	public void draw(IRenderer renderer) {
		if(true)
			return;
		float pad = 0.05f;
		float height = 0.1f;
		Position pos = getPosition();
		float x = pos.x;
		float y = pos.y;
		float start = 0.5f;

		float x0 = x + pad - 0.5f;
		float y0 = y - start;
		float y1 = y - start + height;

		float x1 = x - pad + 0.5f;

		float nx1 = x0 + (x1 - x0) * (energy / orignalEnergy);

		renderer.drawRect(x0, y0, x1, y1, BORDER_COLOR);
		renderer.fillRect(x0, y0, nx1, y1, FILL_COLOR);
	}

	@Override
	public void setPosition(Position p) {
		super.setPosition(p);<commit_msg>cleanup<commit_after>package com.cdm.view.enemy;

import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.math.Vector3;
import com.cdm.view.IRenderer;
import com.cdm.view.Position;
import com.cdm.view.elements.shots.MovingShot;
import com.cdm.view.elements.units.Unit;

public abstract class EnemyUnit extends Unit {

	private static final float FREEZE_FACTOR = 0.5f;
	private static final Color BORDER_COLOR = new Color(1, 0, 0, 0.8f);
	private static final Color FILL_COLOR = new Color(1, 0, 0, 0.7f);

	private float energy = -1;
	private float orignalEnergy = -1;
	private float frozenTime = 0.0f;
	private float speed = -10.0f;
	private ShakingLines shaking = new ShakingLines();

	public EnemyUnit(Position pos) {
		super(pos);
	}

	public void setEnergy(float e) {

		if (energy < 0) {
			orignalEnergy = e;

			energy = e;
		}
	}

	public ShakingLines getShakingLines() {
		return shaking;
	}

	public abstract int getMoney();

	public abstract int getPoints();

	public abstract int getBonus();

	@Override
	public void draw(IRenderer renderer) {
		if (true)
			return;
	}

	public void drawEnergyBar(IRenderer renderer) {
		float pad = 0.05f;
		float height = 0.1f;
		Position pos = getPosition();
		float x = pos.x;
		float y = pos.y;
		float start = 0.5f;

		float x0 = x + pad - 0.5f;
		float y0 = y - start;
		float y1 = y - start + height;

		float x1 = x - pad + 0.5f;

		float nx1 = x0 + (x1 - x0) * (energy / orignalEnergy);

		renderer.drawRect(x0, y0, x1, y1, BORDER_COLOR);
		renderer.fillRect(x0, y0, nx1, y1, FILL_COLOR);
	}

	@Override
	public void setPosition(Position p) {
		super.setPosition(p);
{'fraction_non_alphanumeric': 0.11706102117061021, 'fraction_numerical': 0.029887920298879204, 'mean_word_length': 3.5445544554455446, 'pattern_counts': {'":': 0, '<': 5, '<?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': '6255228', 'n_tokens_mistral': 1319, 'n_tokens_neox': 1185, 'n_words': 336}