<commit_before>const _ = require('lodash');
const Constants = require("./constants.js");

class Room {
  constructor(type) {
    this.type = type;
    this.enemies = [];
    this.medics = [];
    this.holes = [];
    this.killEnemiesItems = [];
    if(this.type !== Constants.EXIT) {
      const roomNumber = _.random(0, 4);
      this[`buildRoom${roomNumber}`]();
    }
  }

  getType() {
    return this.type;
  }

  setType(type) {
    this.type = type;
  }

  buildRoom1() {
    const x = -150;
    const y = 80;
    const speed = 8;
    const enemies = [
      { x, y, speedX: 0, speedY: speed, width: Constants.DefaultWidthEnemy, height: Constants.DefaultHeightEnemy },
      { x: x + 250, y: y + 50, speedX: 0, speedY: -speed,  width: Constants.DefaultWidthEnemy, height: Constants.DefaultHeightEnemy }
    ];

    const medics = [
      { x, y, width: 40, height: 40 }
    ];
    this.enemies = enemies;
    this.medics = medics;
  }

  buildRoom2() {
    const x = 40;
    const y = -150;
    const speed = 8;
    const enemies = [
      { x, y, speedX: speed, speedY: 0, width: Constants.DefaultWidthEnemy, height: Constants.DefaultHeightEnemy },
      { x: x , y: y + 250, speedX: speed, speedY: 0,  width: Constants.DefaultWidthEnemy, height: Constants.DefaultHeightEnemy }
    ];

    const medics = [
      { x, y, width: 40, height: 40 }
    ];

    this.enemies = enemies;
    this.medics = medics;
  }

  buildRoom4() {
    const x = 40;
    const y = -150;
    const speed = 8;
    const enemies = [
      { x, y, speedX: speed, speedY: 0, width: Constants.DefaultWidthEnemy, height: Constants.DefaultHeightEnemy },
      { x: x , y: y + 250, speedX: speed, speedY: 0,  width: Constants.DefaultWidthEnemy, height: Constants.DefaultHeightEnemy }
    ];

    const medics = [
      { x, y, width: 40, height: 40 }
    ];

    const removeEnemyItems = [
      { x: 50, y: 20 , width: 50, height: 50 }
    ]

    this.enemies = enemies;
    this.medics = medics;
    this.killEnemiesItems = removeEnemyItems;
  }

  buildRoom3() {
   const x = -200;
    const y = 50;
    const radius = 100;
    this.holes = [
      { x, y, radius }
    ];
  }

  getEnemies() {
    return this.enemies;
  }

  getMedics() {
    return this.medics;
  }

  getHoles() {<commit_msg>remove offset in removeEnemyItem<commit_after>const _ = require('lodash');
const Constants = require("./constants.js");

class Room {
  constructor(type) {
    this.type = type;
    this.enemies = [];
    this.medics = [];
    this.holes = [];
    this.killEnemiesItems = [];
    if(this.type !== Constants.EXIT) {
      const roomNumber = _.random(1, 4);
      this[`buildRoom${roomNumber}`]();
    }
  }

  getType() {
    return this.type;
  }

  setType(type) {
    this.type = type;
  }

  buildRoom1() {
    const x = -150;
    const y = 80;
    const speed = 8;
    const enemies = [
      { x, y, speedX: 0, speedY: speed, width: Constants.DefaultWidthEnemy, height: Constants.DefaultHeightEnemy },
      { x: x + 250, y: y + 50, speedX: 0, speedY: -speed,  width: Constants.DefaultWidthEnemy, height: Constants.DefaultHeightEnemy }
    ];

    const medics = [
      { x, y, width: 40, height: 40 }
    ];
    this.enemies = enemies;
    this.medics = medics;
  }

  buildRoom2() {
    const x = 40;
    const y = -150;
    const speed = 8;
    const enemies = [
      { x, y, speedX: speed, speedY: 0, width: Constants.DefaultWidthEnemy, height: Constants.DefaultHeightEnemy },
      { x: x , y: y + 250, speedX: speed, speedY: 0,  width: Constants.DefaultWidthEnemy, height: Constants.DefaultHeightEnemy }
    ];

    const medics = [
      { x, y, width: 40, height: 40 }
    ];

    this.enemies = enemies;
    this.medics = medics;
  }

  buildRoom4() {
    const x = 40;
    const y = -150;
    const speed = 8;
    const enemies = [
      { x, y, speedX: speed, speedY: 0, width: Constants.DefaultWidthEnemy, height: Constants.DefaultHeightEnemy },
      { x: x , y: y + 250, speedX: speed, speedY: 0,  width: Constants.DefaultWidthEnemy, height: Constants.DefaultHeightEnemy }
    ];

    const medics = [
      { x, y, width: 40, height: 40 }
    ];

    const removeEnemyItems = [
      { x: 0, y: 0, width: 50, height: 50 }
    ]

    this.enemies = enemies;
    this.medics = medics;
    this.killEnemiesItems = removeEnemyItems;
  }

  buildRoom3() {
   const x = -200;
    const y = 50;
    const radius = 100;
    this.holes = [
      { x, y, radius }
    ];
  }

  getEnemies() {
    return this.enemies;
  }

  getMedics() {
    return this.medics;
  }

  getHoles() {
{'fraction_non_alphanumeric': 0.14085739282589677, 'fraction_numerical': 0.02974628171478565, 'mean_word_length': 2.4152352501867065, 'pattern_counts': {'":': 0, '<': 3, '<?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': '2679717', 'n_tokens_mistral': 1781, 'n_tokens_neox': 1622, 'n_words': 407}