<commit_before>enemies = null
enemyList = []

class EnemyManager

  maxEnemies: 15
  spawnFrequency: 3 #seconds

  constructor: ->
    @enemiesOnScreen = 0
    enemies = game.add.group()
    enemies.enableBody = true

    game.time.events.loop(Phaser.Timer.SECOND * @spawnFrequency, @spawnWrapper, this)


  spawn: (x, y) -><commit_msg>Add varying enemy spawn frequency depending on selected level<commit_after>enemies = null
enemyList = []

class EnemyManager

  maxEnemies: 15

  constructor: ->
    @enemiesOnScreen = 0
    enemies = game.add.group()
    enemies.enableBody = true

    switch currentLevel
      when 'one'   then @spawnFrequency = 4 #seconds
      when 'two'   then @spawnFrequency = 3 #seconds
      when 'three' then @spawnFrequency = 2 #seconds
      when 'four'  then @spawnFrequency = 1 #second

    game.time.events.loop(Phaser.Timer.SECOND * @spawnFrequency, @spawnWrapper, this)


  spawn: (x, y) ->
{'fraction_non_alphanumeric': 0.10571736785329018, 'fraction_numerical': 0.011866235167206042, 'mean_word_length': 3.3773584905660377, 'pattern_counts': {'":': 0, '<': 3, '<?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': '7196704', 'n_tokens_mistral': 326, 'n_tokens_neox': 301, 'n_words': 79}