<commit_before>package GameLogic;

import java.awt.event.KeyEvent;
import java.util.List;

import org.jbox2d.common.Vec2;

import phys.Physics;
import GameLogic.Characters.Entity;
import GameLogic.Characters.Rule;
import GameLogic.Characters.Rulette;
import Resources.R;
import Sound.Sound;

public class Game {
	public static final int GAMESTATUS_PLAYING = 0;
	public static final int GAMESTATUS_FAILED = 1;
	public static final int GAMESTATUS_WON = 2;
	
	private float speed = 2.5f;
	private float jumpspeed = 0.3f;
	
	private Entity selectedCharacter;
	
	private Rule rule;
	private Rulette rulette;
	
	private List<Entity> gameObjects;
	
	private long lasttime = 0l;
	private long levelTransitionTime = 2500;
	
	private int gameStatus = GAMESTATUS_PLAYING;
	private int currentLevel;


	public Game(){
		
	}
	
	
	/**
	 * Starts a new thread and begins the game
	 */
	public void startGame(){
		
		Score.resetScore();

		Sound.playMusic(R.sound.music.getRandom());
		
		currentLevel = 11;
		loadLevel(currentLevel);		
	}
	
	public void loadLevel(int number){
		
		// Remove world
		if( gameObjects != null ){
			for(Entity e : gameObjects){
				Physics.world.destroyBody(e.getBody());
			}
		}
		
		
		gameObjects = Level.load(number);
		rule = (Rule) gameObjects.get(gameObjects.size()-2);
		rulette = (Rulette) gameObjects.get(gameObjects.size()-1);
		selectedCharacter = rule;
		gameStatus = GAMESTATUS_PLAYING;
	}
	
	public void resetLevel(){
		loadLevel(currentLevel);
	}
	
	public void stopGame(){
		
		// Remove world
		if( gameObjects != null ){
			for(Entity e : gameObjects){
				Physics.world.destroyBody(e.getBody());<commit_msg>Changed starting level to 0<commit_after>package GameLogic;

import java.awt.event.KeyEvent;
import java.util.List;

import org.jbox2d.common.Vec2;

import phys.Physics;
import GameLogic.Characters.Entity;
import GameLogic.Characters.Rule;
import GameLogic.Characters.Rulette;
import Resources.R;
import Sound.Sound;

public class Game {
	public static final int GAMESTATUS_PLAYING = 0;
	public static final int GAMESTATUS_FAILED = 1;
	public static final int GAMESTATUS_WON = 2;
	
	private float speed = 2.5f;
	private float jumpspeed = 0.3f;
	
	private Entity selectedCharacter;
	
	private Rule rule;
	private Rulette rulette;
	
	private List<Entity> gameObjects;
	
	private long lasttime = 0l;
	private long levelTransitionTime = 2500;
	
	private int gameStatus = GAMESTATUS_PLAYING;
	private int currentLevel;


	public Game(){
		
	}
	
	
	/**
	 * Starts a new thread and begins the game
	 */
	public void startGame(){
		
		Score.resetScore();

		Sound.playMusic(R.sound.music.getRandom());
		
		currentLevel = 0;
		loadLevel(currentLevel);		
	}
	
	public void loadLevel(int number){
		
		// Remove world
		if( gameObjects != null ){
			for(Entity e : gameObjects){
				Physics.world.destroyBody(e.getBody());
			}
		}
		
		
		gameObjects = Level.load(number);
		rule = (Rule) gameObjects.get(gameObjects.size()-2);
		rulette = (Rulette) gameObjects.get(gameObjects.size()-1);
		selectedCharacter = rule;
		gameStatus = GAMESTATUS_PLAYING;
	}
	
	public void resetLevel(){
		loadLevel(currentLevel);
	}
	
	public void stopGame(){
		
		// Remove world
		if( gameObjects != null ){
			for(Entity e : gameObjects){
				Physics.world.destroyBody(e.getBody());
{'fraction_non_alphanumeric': 0.1048167222053923, 'fraction_numerical': 0.01090578612541654, 'mean_word_length': 3.8918518518518517, 'pattern_counts': {'":': 0, '<': 5, '<?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': '3089835', 'n_tokens_mistral': 1217, 'n_tokens_neox': 1042, 'n_words': 273}