<commit_before>package octolink.entity.link;

import gameframework.base.MoveStrategyStraightLine;
import gameframework.base.SpeedVector;
import gameframework.game.GameMovableDriver;
import gameframework.game.GameMovableDriverDefaultImpl;

import java.awt.Point;

import octolink.entity.Creep;

public class DefenderState extends AbstractState {

	@Override
	public String getValue() {
		return "shield-";
	}

	@Override
	public int strike() {
		return 0;
	}

	@Override
	public int parryFront(int damage) {
		return 0;
	}

	@Override
	public void collideFront(Link l, Creep c) {
		Point p = l.getPosition();
		SpeedVector creepSpeedVector = c.getSpeedVector();
		GameMovableDriver oldLinkDriver = l.getDriver();

		GameMovableDriverDefaultImpl linkDriver = new GameMovableDriverDefaultImpl();
		Point destination = new Point((int) (p.getX() + creepSpeedVector
				.getDirection().getX() * 20),
				(int) (p.getY() + creepSpeedVector.getDirection().getY() * 20));

		linkDriver.setStrategy(new MoveStrategyStraightLine(p, destination));
		l.setDriver(linkDriver);
		for (int i = 0; i < 3; ++i)
			l.oneStepMove();
		l.setDriver(oldLinkDriver);
		l.parryFront(c.damage());
	}
	
}<commit_msg>Link now pushes enemies back with his shield<commit_after>package octolink.entity.link;

import gameframework.base.MoveStrategyStraightLine;
import gameframework.base.SpeedVector;
import gameframework.base.SpeedVectorDefaultImpl;
import gameframework.game.GameMovableDriver;
import gameframework.game.GameMovableDriverDefaultImpl;

import java.awt.Point;

import octolink.entity.Creep;

public class DefenderState extends AbstractState {

	@Override
	public String getValue() {
		return "shield-";
	}

	@Override
	public int strike() {
		return 0;
	}

	@Override
	public int parryFront(int damage) {
		return 0;
	}

	@Override
	public void collideFront(Link l, Creep c) {
		Point p = l.getPosition();
		SpeedVector creepSpeedVector = c.getSpeedVector();
		
		GameMovableDriver oldCreepDriver = c.getDriver();

		c.setSpeedVector(new SpeedVectorDefaultImpl(
				new Point((int)-creepSpeedVector.getDirection().getX(),
						(int)-creepSpeedVector.getDirection().getY()),
						creepSpeedVector.getSpeed()*10));

		for (int i = 0; i < 3; ++i) {
			c.oneStepMove();
		}
		
		c.setDriver(oldCreepDriver);
		c.setSpeedVector(creepSpeedVector);
		l.parryFront(c.damage());
	}
	
}
{'fraction_non_alphanumeric': 0.11558001693480102, 'fraction_numerical': 0.0059271803556308214, 'mean_word_length': 4.937185929648241, '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': '5389803', 'n_tokens_mistral': 858, 'n_tokens_neox': 755, 'n_words': 164}