<commit_before>var x
var y
var speed = 10
var xDirection = 1
var yDirection = 1

function setup() {
  createCanvas(500, 500)
  x = 20
  y = 20
}

function draw() {
  noCursor()
  background('white')
  ellipse(x, y, 20, 20)
  rect(450, mouseY, 20, 80)
  x = x + xDirection * speed
  y = y + yDirection * speed
  if (x >=450 && y>=mouseY && y <=mouseY+80 || x <=0) {
    xDirection = xDirection * -1;
  } else if (y >= height || y <= 0) {
    yDirection = yDirection * -1;
  } else if (x>=windowWidth){
    x = 20
    y = 20
  }
}<commit_msg>⚡️ Fixed it!<commit_after>var x
var y
var speed = 10
var xDirection = 1
var yDirection = 1
score = 0

function setup() {
  createCanvas(windowWidth, windowHeight)
  x = 20
  y = 20
}

function draw() {
  noCursor()
  background('white')
  textSize(32)
  text(score, 40, 40)
  ellipse(x, y, 20, 20)
  rect(windowWidth-50, mouseY, 20, 80)
  x = x + xDirection * speed
  y = y + yDirection * speed
  if (x >= windowWidth-50 && y >= mouseY && y <= mouseY + 80) { // removed || so score would work correctly
    xDirection = xDirection * -1;
    score = score + 1
  } else if (x <= 0) {
    xDirection = xDirection * -1;

  } else if (y >= height || y <= 0) {
    yDirection = yDirection * -1;
  } else if (x >= windowWidth) {
    x = 10
    y = random(0, windowHeight)
    score = 0
  }
}
{'fraction_non_alphanumeric': 0.1510574018126888, 'fraction_numerical': 0.0581570996978852, 'mean_word_length': 2.6908077994428967, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 11, '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': '4307173', 'n_tokens_mistral': 562, 'n_tokens_neox': 499, 'n_words': 164}