<commit_before>require 'xibe'
include Xibe

class Example < Application
  def initialize
    super(320,240)
    self.fill = Color.white
    @ball = Sprite.new("ball.bmp",32,32,true)
    @clone = @ball.clone
    @clone.pos(100,100)
    add @ball, @clone
  end

  def update
    if Key.press? K_RIGHT
      @ball.x += 5
      while(@ball.collide_box?(@clone))
        @ball.x -= 1
      end
    end
    if Key.press? K_LEFT
      @ball.x -= 5
      while(@ball.collide_box?(@clone))
        @ball.x += 1
      end
    end
    if Key.press? K_DOWN
      @ball.y += 5
      while(@ball.collide_box?(@clone))
        @ball.y -= 1
      end
    end
    if Key.press? K_UP
      @ball.y -= 5
      while(@ball.collide_box?(@clone))
        @ball.y += 1
      end
    end   
  end
end

Example.new.run<commit_msg>Collision PP<commit_after>require 'xibe'
include Xibe

class Example < Application
  def initialize
    super(320,240)
    self.fill = Color.white
    @ball = Sprite.new("ball.bmp",32,32,true)
    @clone = @ball.clone
    @clone.pos(100,100)
    add @ball, @clone
  end

  def update
    if Key.press? K_RIGHT
      @ball.x += 5
      while(@ball.collide_with?(@clone))
        @ball.x -= 1
      end
    end
    if Key.press? K_LEFT
      @ball.x -= 5
      while(@ball.collide_with?(@clone))
        @ball.x += 1
      end
    end
    if Key.press? K_DOWN
      @ball.y += 5
      while(@ball.collide_with?(@clone))
        @ball.y -= 1
      end
    end
    if Key.press? K_UP
      @ball.y -= 5
      while(@ball.collide_with?(@clone))
        @ball.y += 1
      end
    end   
  end
end

Example.new.run
{'fraction_non_alphanumeric': 0.1351518908865468, 'fraction_numerical': 0.029758214507129573, 'mean_word_length': 1.8821428571428571, 'pattern_counts': {'":': 0, '<': 5, '<?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': '3994829', 'n_tokens_mistral': 635, 'n_tokens_neox': 596, 'n_words': 132}