<commit_before>package com.sturdyhelmetgames.roomforchange.entity;

import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.math.Rectangle;
import com.sturdyhelmetgames.roomforchange.assets.Assets;
import com.sturdyhelmetgames.roomforchange.level.Level;

public class ExplodingBomb extends Bomb {

	private final Rectangle explosionRadius = new Rectangle(0f, 0f, 3f, 3f);

	public ExplodingBomb(float x, float y, Level level) {
		super(x, y, level);
	}

	@Override
	public void render(float delta, SpriteBatch batch) {
		// super.render(delta, batch);

		// calculate scale
		final float scale = getScale();
		batch.draw(Assets.bomb.getKeyFrame(stateTime), bounds.x, bounds.y
				- 0.5f + zz, 0f, 0f, 1f, 1f, scale, scale, 0f);
	}

	@Override
	public void update(float fixedStep) {
		// super.update(fixedStep);
		stateTime += fixedStep;
		if (stateTime > 3f && !isDead() && !isDying()) {
			aliveTick = ALIVE_TIME_MAX;
			explosionRadius.setPosition(bounds.x - 1.5f, bounds.y - 1.5f);
			level.addParticleEffect(Assets.PARTICLE_EXPLOSION, bounds.x + 0.5f,
					bounds.y + 0.5f);
			Assets.getGameSound(Assets.SOUND_EXPLOSION).play(0.7f);
			for (int i = 0; i < level.entities.size; i++) {
				final Entity entity = level.entities.get(i);
				entity.hit(explosionRadius);
				if (entity == level.player) {
					if (explosionRadius.overlaps(level.player.bounds)) {
						level.player.takeDamage();
					}
				}
			}
		}
	}

}<commit_msg>Increased explosion radius and fix bug<commit_after>package com.sturdyhelmetgames.roomforchange.entity;

import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.math.Rectangle;
import com.sturdyhelmetgames.roomforchange.assets.Assets;
import com.sturdyhelmetgames.roomforchange.level.Level;

public class ExplodingBomb extends Bomb {

	private final Rectangle explosionRadius = new Rectangle(0f, 0f, 3.5f, 3.5f);

	public ExplodingBomb(float x, float y, Level level) {
		super(x, y, level);
	}

	@Override
	public void render(float delta, SpriteBatch batch) {
		// super.render(delta, batch);

		// calculate scale
		final float scale = getScale();
		batch.draw(Assets.bomb.getKeyFrame(stateTime), bounds.x, bounds.y
				- 0.5f + zz, 0f, 0f, 1f, 1f, scale, scale, 0f);
	}

	@Override
	public void update(float fixedStep) {
		// super.update(fixedStep);
		stateTime += fixedStep;
		if (stateTime > 3f && !isDead() && !isDying()) {
			aliveTick = ALIVE_TIME_MAX;
			explosionRadius.setPosition(bounds.x - 1.5f, bounds.y - 1.5f);
			level.addParticleEffect(Assets.PARTICLE_EXPLOSION, bounds.x + 0.5f,
					bounds.y + 0.5f);
			Assets.getGameSound(Assets.SOUND_EXPLOSION).play(0.7f);
			for (int i = 0; i < level.entities.size; i++) {
				final Entity entity = level.entities.get(i);
				if (entity != level.player
						&& explosionRadius.overlaps(entity.bounds)) {
					entity.state = EntityState.DYING;
				} else if (explosionRadius.overlaps(level.player.bounds)) {
					level.player.takeDamage();
				}
			}
		}
	}
}
{'fraction_non_alphanumeric': 0.13382402141184344, 'fraction_numerical': 0.01672800267648043, 'mean_word_length': 3.925864909390445, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '145166', 'n_tokens_mistral': 1247, 'n_tokens_neox': 1086, 'n_words': 216}