<commit_before>Crafty.c 'BattleShip',
  required: '2D, WebGL, Tween, Choreography, ShipSolid, Collision,' +
    'Hideable, Flipable, Scalable, SunBlock, WaterSplashes, ShipCabin, Sprite'

  init: ->
    width = 40
    @attr(
      w: 32 * width
      h: 32 * 7
      z: -20
      waterRadius: 10
      minSplashDuration: 600
      defaultWaterCooldown: 400
      waterSplashSpeed: 700
      minOffset: -20
    )
    @_topX = 0
    @_bottomX = 0
    @_color = {
      _red: 128,
      _green: 0,
      _blue: 0
    }

    topParts = [
      'Start'
      'TopFlat'
      'TopFlat'
      'TopFlat'
      'TopFlat'
      'TopFlat'
      'TopFlat'
      'TopFlat'
      'TopFlat'
      'End'
    ]
    for p in topParts
      @_topX += @_addTopParts(p, @_topX)

    bottomParts = [
      'BottomFlat'
      'BottomSpace'
      'BottomFlat'
      'BottomFlat'
      'BottomFlat'
      'BottomSpace'
      'BottomFlat'
      'BottomFlat'
    ]
    @_addBottomParts(p) for p in bottomParts

    @hatch = Crafty.e('CarrierHatch, ShipHatch1').attr(
      x: @x + 10 * 32
      y: @y + 29
    )
    @attach(@hatch)

    @hatch2 = Crafty.e('CarrierHatch, ShipHatch2').attr(
      x: @x + 20 * 32
      y: @y + 29
    )
    @attach(@hatch2)

    @attach Crafty.e('2D, Cabin1Place').attr(
      x: @x + 416
      y: @y + 100
      z: -8
      w: 15
      h: 2
    )

    @attach Crafty.e('2D, HeliPlace').attr(
      x: @x + 646
      y: @y - 32
      z: -8
      w: 15
      h: 2
    )
    @attach Crafty.e('2D, HeliPlace').attr(
      x: @x + 756
      y: @y - 32
      z: -8
      w: 15
      h: 2
    )

    @attach Crafty.e('2D, Cabin2Place').attr(
      x: @x + 900
      y: @y + 100
      z: -8
      w: 15
      h: 2
    )

    @attach Crafty.e('2D, MineCannonPlace').attr(
      x: @x + 100
      y: @y + 44
      z: -6
      w: 15
      h: 2
    )

    @attach Crafty.e('2D, TurretPlace').attr(
      x: @x + 550
      y: @y + 44
      z: -6
      w: 15
      h: 2
    )

    @attach Crafty.e('2D, TurretPlace').attr(
      x: @x + 800
      y: @y + 44
      z: -6
      w: 15
      h: 2
    )

    @attach Crafty.e('2D, DroneShipCorePlace').attr(
      x: @x + 900
      y: @y + 50
      z: -8
      w: 15
      h: 2<commit_msg>Place enemy properly.<commit_after>Crafty.c 'BattleShip',
  required: '2D, WebGL, Tween, Choreography, ShipSolid, Collision,' +
    'Hideable, Flipable, Scalable, SunBlock, WaterSplashes, ShipCabin, Sprite'

  init: ->
    width = 40
    @attr(
      w: 32 * width
      h: 32 * 7
      z: -20
      waterRadius: 10
      minSplashDuration: 600
      defaultWaterCooldown: 400
      waterSplashSpeed: 700
      minOffset: -20
    )
    @_topX = 0
    @_bottomX = 0
    @_color = {
      _red: 128,
      _green: 0,
      _blue: 0
    }

    topParts = [
      'Start'
      'TopFlat'
      'TopFlat'
      'TopFlat'
      'TopFlat'
      'TopFlat'
      'TopFlat'
      'TopFlat'
      'TopFlat'
      'End'
    ]
    for p in topParts
      @_topX += @_addTopParts(p, @_topX)

    bottomParts = [
      'BottomFlat'
      'BottomSpace'
      'BottomFlat'
      'BottomFlat'
      'BottomFlat'
      'BottomSpace'
      'BottomFlat'
      'BottomFlat'
    ]
    @_addBottomParts(p) for p in bottomParts

    @hatch = Crafty.e('CarrierHatch, ShipHatch1').attr(
      x: @x + 10 * 32
      y: @y + 29
    )
    @attach(@hatch)

    @hatch2 = Crafty.e('CarrierHatch, ShipHatch2').attr(
      x: @x + 20 * 32
      y: @y + 29
    )
    @attach(@hatch2)

    @attach Crafty.e('2D, Cabin1Place').attr(
      x: @x + 416
      y: @y + 100
      z: -8
      w: 15
      h: 2
    )

    @attach Crafty.e('2D, HeliPlace').attr(
      x: @x + 646
      y: @y - 32
      z: -8
      w: 15
      h: 2
    )
    @attach Crafty.e('2D, HeliPlace').attr(
      x: @x + 756
      y: @y - 32
      z: -8
      w: 15
      h: 2
    )

    @attach Crafty.e('2D, Cabin2Place').attr(
      x: @x + 900
      y: @y + 100
      z: -8
      w: 15
      h: 2
    )

    @attach Crafty.e('2D, MineCannonPlace').attr(
      x: @x + 100
      y: @y + 44
      z: -6
      w: 15
      h: 2
    )

    @attach Crafty.e('2D, TurretPlace').attr(
      x: @x + 550
      y: @y + 44
      z: -6
      w: 15
      h: 2
    )

    @attach Crafty.e('2D, TurretPlace').attr(
      x: @x + 800
      y: @y + 44
      z: -6
      w: 15
      h: 2
    )

    @attach Crafty.e('2D, DroneShipCorePlace').attr(
      x: @x + 900
      y: @y - 125
      z: -8
      w: 15
      h: 2
{'fraction_non_alphanumeric': 0.14055144586415602, 'fraction_numerical': 0.05850706119704102, 'mean_word_length': 1.4529961517317207, 'pattern_counts': {'":': 0, '<': 3, '<?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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1447117', 'n_tokens_mistral': 2054, 'n_tokens_neox': 1816, 'n_words': 447}