<commit_before>var utils = require('../lib/utils.js');


var MUSOLINI = {
  info: {
    name: 'Pedobear',
    style: 5
  },
  ai: (playerState, enemiesStates, gameEnvironment) => {
    var directionToAmmo;

    if (utils.canKill(playerState, enemiesStates) && playerState.ammo) {
      return 'shoot';
    }

    // Check if enemies will shoot me if I move
    var minDistance = {d: 10000, direction: null};
    enemiesStates.forEach(enemy => {
      if (enemy.isAlive) {
        if (Math.abs(enemy.position[0] - playerState.position[0]) < minDistance.d) {
          minDistance.d = Math.abs(enemy.position[0] - playerState.position[0])
          minDistance.enemy = enemy
        }
        if (Math.abs(enemy.position[1] - playerState.position[1]) < minDistance.d) {
          minDistance.d = Math.abs(enemy.position[1] - playerState.position[1])
          minDistance.enemy = enemy
        }
      }
    })
    console.log(minDistance)

    if (minDistance.enemy && minDistance.d < 3 && playerState.ammo) {
      return utils.fastGetDirection(playerState.position, minDistance.enemy.position)
    }

    if (gameEnvironment.ammoPosition.length) {
      directionToAmmo = utils.fastGetDirection(playerState.position, gameEnvironment.ammoPosition[0]);
<commit_msg>Change Pedobear style<commit_after>var utils = require('../lib/utils.js');


var MUSOLINI = {
  info: {
    name: 'Pedobear',
    style: 8
  },
  ai: (playerState, enemiesStates, gameEnvironment) => {
    var directionToAmmo;

    if (utils.canKill(playerState, enemiesStates) && playerState.ammo) {
      return 'shoot';
    }

    // Check if enemies will shoot me if I move
    var minDistance = {d: 10000, direction: null};
    enemiesStates.forEach(enemy => {
      if (enemy.isAlive) {
        if (Math.abs(enemy.position[0] - playerState.position[0]) < minDistance.d) {
          minDistance.d = Math.abs(enemy.position[0] - playerState.position[0])
          minDistance.enemy = enemy
        }
        if (Math.abs(enemy.position[1] - playerState.position[1]) < minDistance.d) {
          minDistance.d = Math.abs(enemy.position[1] - playerState.position[1])
          minDistance.enemy = enemy
        }
      }
    })
    console.log(minDistance)

    if (minDistance.enemy && minDistance.d < 2 && playerState.ammo) {
      return utils.fastGetDirection(playerState.position, minDistance.enemy.position)
    }

    if (gameEnvironment.ammoPosition.length) {
      directionToAmmo = utils.fastGetDirection(playerState.position, gameEnvironment.ammoPosition[0]);

{'fraction_non_alphanumeric': 0.1309148264984227, 'fraction_numerical': 0.012618296529968454, 'mean_word_length': 2.921174652241113, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 7, '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': '6683660', 'n_tokens_mistral': 839, 'n_tokens_neox': 814, 'n_words': 146}