<commit_before>LEVELS = [
  {
    name: '<NAME>',
    numStars: 7,
    startingStar: 0,
    starsArray: [
        {x: 309, y: 40},
        {x: 257, y: 125},
        {x: 220, y: 235},
        {x: 247, y: 357},
        {x: 189, y: 391},
        {x: 261, y: 508},        
        {x: 319, y: 455},
    ]
  },{
    name: '<NAME>',
    numStars: 7,
    startingStar: 0,
    starsArray: [
        {x: 46, y: 275},
        {x: 142, y: 200},
        {x: 221, y: 201},
        {x: 318, y: 193},
        {x: 371, y: 252},
        {x: 497, y: 189},
        {x: 472, y: 97},
    ]
  },
  {
    name: '<NAME>',
    numStars: 9,
    startingStar: 0,
    starsArray: [
        {x: 381, y: 409},
        {x: 215, y: 286},
        {x: 64, y: 182},
        {x: 101, y: 31},
        {x: 222, y: 52},
        {x: 259, y: 210},
        {x: 288, y: 544},
        {x: 481, y: 397},
        {x: 519, y: 440},
    ]
  },
  
]


class Game

  @player = null 

  create: ->
    #setup game window
    @levelnum = 0
    @level = LEVELS[@levelnum]
    x = @level.starsArray[@level.startingStar].x
    y = @level.starsArray[@level.startingStar].y

    #add Sprites
    @game.add.sprite 0, 0, 'background'
    #Plot empty stars
    @constellation = []
    @levelcomplete = false
    @drawConstellation(@level)
    @player = @add.sprite x, y, 'player'
    @player.scale.set 0.5,0.5

    #add sounds
    #@soundSputnik = @game.add.audio 'soundSputnik'

    #setup game input/output
    #@input.onDown.add @onInputDown, this
    @cursors = @game.input.keyboard.createCursorKeys()

    #setup game physics
    @game.physics.startSystem Phaser.Physics.P2JS
    @game.physics.p2.enable @player
    @game.physics.p2.defaultRestitution = 0.8
    @player.body.fixedRotation = true
    @player.body.setZeroDamping()

  update: ->
     @player.body.setZeroVelocity()<commit_msg>Moves through the levels on mouse clicks.<commit_after>LEVELS = [
  {
    name: '<NAME>',
    numStars: 7,
    startingStar: 0,
    starsArray: [
        {x: 309, y: 40},
        {x: 257, y: 125},
        {x: 220, y: 235},
        {x: 247, y: 357},
        {x: 189, y: 391},
        {x: 261, y: 508},        
        {x: 319, y: 455},
    ]
  },{
    name: '<NAME>',
    numStars: 7,
    startingStar: 0,
    starsArray: [
        {x: 46, y: 275},
        {x: 142, y: 200},
        {x: 221, y: 201},
        {x: 318, y: 193},
        {x: 371, y: 252},
        {x: 497, y: 189},
        {x: 472, y: 97},
    ]
  },
  {
    name: '<NAME>',
    numStars: 9,
    startingStar: 0,
    starsArray: [
        {x: 381, y: 409},
        {x: 215, y: 286},
        {x: 64, y: 182},
        {x: 101, y: 31},
        {x: 222, y: 52},
        {x: 259, y: 210},
        {x: 288, y: 544},
        {x: 481, y: 397},
        {x: 519, y: 440},
    ]
  },
  
]


class Game

  @player = null 

  create: ->
    @levelnum = 0
    @drawLevel(@levelnum)
    @input.onDown.add @onDown, this

  onDown: ->
    if @levelcomplete
       @levelnum++
       @drawLevel(@levelnum)

  drawLevel: (@levelnum) ->
    #setup game window
    @level = LEVELS[@levelnum]
    x = @level.starsArray[@level.startingStar].x
    y = @level.starsArray[@level.startingStar].y

    #add Sprites
    @game.add.sprite 0, 0, 'background'
    #Plot empty stars
    @constellation = []
    @levelcomplete = false
    @drawConstellation(@level)
    @player = @add.sprite x, y, 'player'
    @player.scale.set 0.5,0.5

    #add sounds
    #@soundSputnik = @game.add.audio 'soundSputnik'

    #setup game input/output
    #@input.onDown.add @onInputDown, this
    @cursors = @game.input.keyboard.createCursorKeys()

    #setup game physics
    @game.physics.startSystem Phaser.Physics.P2JS
    @game.physics.p2.enable @player
    @game.physics.p2.defaultRestitution = 0.8
    @player.body.fixedRotation = true
    @player.body.setZeroDamping()

  update: ->
     @player.body.setZeroVelocity()
{'fraction_non_alphanumeric': 0.16851612903225807, 'fraction_numerical': 0.07741935483870968, 'mean_word_length': 1.9565217391304348, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 15, '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': '331462', 'n_tokens_mistral': 1791, 'n_tokens_neox': 1469, 'n_words': 370}