<commit_before>import pygame
from pygame import Rect

class Camera(object):
	def __init__(self, update_function, width, height):
		self.update_function = update_function
		self.state = Rect(0, 0, width, height)

	def scroll(self, target):
		return target.rect.move(self.state.topleft)

	def update(self, target):
		self.state = self.update_function(self.state, target.rect)


class Platform(pygame.sprite.Sprite):
	def __init__(self, x, y):
		pygame.sprite.Sprite.__init__(self)
		self.image = pygame.image.load("images/platform.png")
		self.rect = self.image.get_rect()
		self.x = x
		self.y = y
		self.rect.topleft = x,y


class Player(pygame.sprite.Sprite):
	isFalling = 0
	isJumping = 0
	movingLeft = 0
	movingRight = 0

	def __init__(self,  x, y):
		pygame.sprite.Sprite.__init__(self)
		self.image = pygame.image.load("images/player.png")
		self.rect = self.image.get_rect()
		self.rect.topleft = x,y

	def move(self, event):
		if (event.type == pygame.KEYDOWN):
			if event.key == pygame.K_UP:
                		self.isJumping = 1
			if event.key == pygame.K_RIGHT:
                		self.movingRight = 1
                	if event.key == pygame.K_LEFT:
                        	self.movingLeft = 1
		if (event.type == pygame.KEYUP):
			if event.key == pygame.K_RIGHT:
				self.movingRight = 0
			if event.key == pygame.K_LEFT:
				self.movingLeft = 0

	def update(self):
		movement = [0,0]
		if (self.movingLeft == 1):
			movement[0] = -2
		if (self.movingRight == 1):
			movement[0] = 2
		if (self.isJumping == 1):
			movement[1] = -100
			self.isJumping = 0
		if (self.isFalling ==1):
			movement[1] = 2

	        self.rect = self.rect.move(movement)
	        
class Wall(pygame.sprite.Sprite):
	def __init__(self):
		pygame.sprite.Sprite.__init__(self)
		self.image = pygame.image.load("images/wall.png")
		self.rect = self.image.get_rect()
		self.rect.topleft = 0,0
	
	def update(self):
		self.rect = self.rect.move(1,0)

class Goal(pygame.sprite.Sprite):
	def __init__(self, x, y):
		pygame.sprite.Sprite.__init__(self)
		self.image = pygame.image.load("images/goal.png")
		self.rect = self.image.get_rect()
		self.rect.topleft = x, y
		
class Torch(pygame.sprite.Sprite):
	def __init__(self, x, y):
		self.image = pygame.image.load("images/torch.png")
		self.rect = self.image.get_rect()
		self.rect.topleft = x, y
		
class Crack(pygame.sprite.Sprite):
	def __init__(self, x,y):<commit_msg>Upped movement speed of money wall<commit_after>import pygame
from pygame import Rect

class Camera(object):
	def __init__(self, update_function, width, height):
		self.update_function = update_function
		self.state = Rect(0, 0, width, height)

	def scroll(self, target):
		return target.rect.move(self.state.topleft)

	def update(self, target):
		self.state = self.update_function(self.state, target.rect)


class Platform(pygame.sprite.Sprite):
	def __init__(self, x, y):
		pygame.sprite.Sprite.__init__(self)
		self.image = pygame.image.load("images/platform.png")
		self.rect = self.image.get_rect()
		self.x = x
		self.y = y
		self.rect.topleft = x,y


class Player(pygame.sprite.Sprite):
	isFalling = 0
	isJumping = 0
	movingLeft = 0
	movingRight = 0

	def __init__(self,  x, y):
		pygame.sprite.Sprite.__init__(self)
		self.image = pygame.image.load("images/player.png")
		self.rect = self.image.get_rect()
		self.rect.topleft = x,y

	def move(self, event):
		if (event.type == pygame.KEYDOWN):
			if event.key == pygame.K_UP:
                		self.isJumping = 1
			if event.key == pygame.K_RIGHT:
                		self.movingRight = 1
                	if event.key == pygame.K_LEFT:
                        	self.movingLeft = 1
		if (event.type == pygame.KEYUP):
			if event.key == pygame.K_RIGHT:
				self.movingRight = 0
			if event.key == pygame.K_LEFT:
				self.movingLeft = 0

	def update(self):
		movement = [0,0]
		if (self.movingLeft == 1):
			movement[0] = -2
		if (self.movingRight == 1):
			movement[0] = 2
		if (self.isJumping == 1):
			movement[1] = -100
			self.isJumping = 0
		if (self.isFalling ==1):
			movement[1] = 2

	        self.rect = self.rect.move(movement)
	        
class Wall(pygame.sprite.Sprite):
	def __init__(self):
		pygame.sprite.Sprite.__init__(self)
		self.image = pygame.image.load("images/wall.png")
		self.rect = self.image.get_rect()
		self.rect.topleft = 0,0
	
	def update(self):
		self.rect = self.rect.move(1.75,0)

class Goal(pygame.sprite.Sprite):
	def __init__(self, x, y):
		pygame.sprite.Sprite.__init__(self)
		self.image = pygame.image.load("images/goal.png")
		self.rect = self.image.get_rect()
		self.rect.topleft = x, y
		
class Torch(pygame.sprite.Sprite):
	def __init__(self, x, y):
		self.image = pygame.image.load("images/torch.png")
		self.rect = self.image.get_rect()
		self.rect.topleft = x, y
		
class Crack(pygame.sprite.Sprite):
	def __init__(self, x,y):
{'fraction_non_alphanumeric': 0.14306418219461697, 'fraction_numerical': 0.013664596273291925, 'mean_word_length': 3.161068044788975, 'pattern_counts': {'":': 0, '<': 3, '<?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': '5574416', 'n_tokens_mistral': 2024, 'n_tokens_neox': 1832, 'n_words': 360}