<commit_before>/**
 * 
 */
var snake, food, colour, reversePower;
var scoreText = 'SCORE :', deadText = "Dead :'( \nClick to Try Again";
const L=1, R=2, D=4, U=8;

function reset(){
	if(horz > vert)
		var px = self.innerHeight/45, horz = self.innerWidth/px, vert = 45;
	else
		var px = self.innerHeight/60, horz = 60, vert = self.innerHeight/px;
	console.log("Reset");
	snake = new Snake();
	food = new Food();
	colour = new Colour();
	reversePower = new ReversePower();
	console.log(self.innerWidth +" - "+ self.innerHeight);
}

function setup() {
	createCanvas(horz * px, vert * px);
	noStroke();
	frameRate(10);
	reset();
	textAlign(RIGHT);
}

function draw() {
	background(54, 53, 55);
	if(snake.dead){
		text(deadText, horz/2*px, vert/2*px);	
		return;
		}
	fill(0, 100, 0);
	rect(px, px, (horz-2)*px, (vert-6)*px);
	rect(px, (vert-4)*px, (horz-2)*px, 3*px);
	fill(0);
	text(screen.width + " x " + screen.height, 11*px, (2)*px);
	if(food.createFood){
		food.update();
	}
	if(snake.ate(food)){
		food.createFood =true;
	}
	if(snake.powerCount%reversePower.powerValue==0){
		reversePower.update();
		snake.powerCount = 1;
	}
	if(reversePower.showPower)
		snake.tookPower(reversePower);<commit_msg>Error in code, resolution fix<commit_after>/**
 * 
 */
var snake, food, colour, reversePower;
var scoreText = 'SCORE :', deadText = "Dead :'( \nClick to Try Again";
const L=1, R=2, D=4, U=8;

function reset(){
	console.log("Reset");
	snake = new Snake();
	food = new Food();
	colour = new Colour();
	reversePower = new ReversePower();
	console.log(self.innerWidth +" - "+ self.innerHeight);
}

function setup() {
	if(horz > vert)
		var px = self.innerHeight/45, horz = self.innerWidth/px, vert = 45;
	else
		var px = self.innerHeight/60, horz = 60, vert = self.innerHeight/px;
	createCanvas(horz * px, vert * px);
	noStroke();
	frameRate(10);
	reset();
	textAlign(RIGHT);
}

function draw() {
	background(54, 53, 55);
	if(snake.dead){
		text(deadText, horz/2*px, vert/2*px);	
		return;
		}
	fill(0, 100, 0);
	rect(px, px, (horz-2)*px, (vert-6)*px);
	rect(px, (vert-4)*px, (horz-2)*px, 3*px);
	fill(0);
	text(screen.width + " x " + screen.height, 11*px, (2)*px);
	if(food.createFood){
		food.update();
	}
	if(snake.ate(food)){
		food.createFood =true;
	}
	if(snake.powerCount%reversePower.powerValue==0){
		reversePower.update();
		snake.powerCount = 1;
	}
	if(reversePower.showPower)
		snake.tookPower(reversePower);
{'fraction_non_alphanumeric': 0.19329470198675497, 'fraction_numerical': 0.03145695364238411, 'mean_word_length': 4.312087912087912, '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': '3235942', 'n_tokens_mistral': 1048, 'n_tokens_neox': 985, 'n_words': 207}