<commit_before>package com.kehxstudios.atlas.tools;

import com.kehxstudios.atlas.data.ActionData;
import com.kehxstudios.atlas.type.ActionType;
import com.kehxstudios.atlas.data.ComponentData;
import com.kehxstudios.atlas.type.ComponentType;
import com.kehxstudios.atlas.data.EntityData;
import com.kehxstudios.atlas.type.TextureType;
import com.kehxstudios.atlas.type.ScreenType;

/**
 * Created by ReidC on 2017-04-26.
 */

public class Templates {

    public static ActionData createLaunchScreenActionData(ScreenType screenType) {
        ActionData actionData = new ActionData();
        actionData.type = ActionType.LAUNCH_SCREEN.getId();
        actionData.putString("screenType", screenType.getId());
        return actionData;
    }

    public static ActionData createHighScoreResetActionData(ScreenType screenType){
        ActionData actionData = new ActionData();
        actionData.type = ActionType.HIGH_SCORE_RESET.getId();
        actionData.putString("screenType", screenType.getId());
        return actionData;
    }

    public static ActionData createPhysicsActionData(float x, float y) {
        ActionData actionData = new ActionData();
        actionData.setType(ActionType.PHYSICS.getId());
        actionData.putFloat("actionValue_x", x);
        actionData.putFloat("actionValue_y", y);
        return actionData;
    }

    public static ActionData createRepositionActionData(float x, float y) {
        ActionData actionData = new ActionData();
        actionData.setType(ActionType.REPOSITION.getId());
        actionData.putFloat("actionValue_x", x);
        actionData.putFloat("actionValue_y", y);
        return actionData;
    }

    public static ActionData createScoreActionData(int score) {
        ActionData actionData = new ActionData();
        actionData.setType(ActionType.SCORE.getId());
        actionData.putInt("actionValue", score);
        return actionData;
    }

    public static ActionData createSpawnEntityActionData(EntityData entityData) {
        ActionData actionData = new ActionData();
        actionData.setType(ActionType.SPAWN_ENTITY.getId());
        actionData.putString("entityData", UtilityTool.getStringFromDataClass(entityData));
        return actionData;
    }

    private static ComponentData createComponentData() {
        ComponentData componentData = new ComponentData();
        componentData.setUseComponentPosition(false);
        componentData.setUsePositionAsOffset(false);
        componentData.setEnabled(true);
        return componentData;
    }

    public static ComponentData createPhysicsComponentData(float maxAccelerationX, float maxAccelerationY,
                                                           float maxVelocityX, float maxVelocityY,
                                                           float bounds_width, float bounds_height,
                                                           boolean collidable) {
        ComponentData physicsData = createComponentData();
        physicsData.setType(ComponentType.PHYSICS.getId());
        physicsData.putFloat("maxAccerlation_x", maxAccelerationX);
        physicsData.putFloat("maxAcceleration_y", maxAccelerationY);
        physicsData.putFloat("maxVeloity_x", maxVelocityX);
        physicsData.putFloat("maxVelocity_y", maxVelocityY);<commit_msg>Update Templates.java<commit_after>package com.kehxstudios.atlas.tools;

import com.kehxstudios.atlas.data.ActionData;
import com.kehxstudios.atlas.type.ActionType;
import com.kehxstudios.atlas.data.ComponentData;
import com.kehxstudios.atlas.type.ComponentType;
import com.kehxstudios.atlas.data.EntityData;
import com.kehxstudios.atlas.type.TextureType;
import com.kehxstudios.atlas.type.ScreenType;

/**
 * Created by ReidC on 2017-04-26.
 */

public class Templates {

    public static ActionData createLaunchScreenActionData(ScreenType screenType) {
        ActionData actionData = new ActionData();
        actionData.type = ActionType.LAUNCH_SCREEN.getId();
        actionData.putString("screenType", screenType.getId());
        return actionData;
    }

    public static ActionData createHighScoreResetActionData(ScreenType screenType){
        ActionData actionData = new ActionData();
        actionData.type = ActionType.HIGH_SCORE_RESET.getId();
        actionData.putString("screenType", screenType.getId());
        return actionData;
    }

    public static ActionData createPhysicsActionData(float x, float y) {
        ActionData actionData = new ActionData();
        actionData.setType(ActionType.PHYSICS.getId());
        actionData.putFloat("actionValue_x", x);
        actionData.putFloat("actionValue_y", y);
        return actionData;
    }

    public static ActionData createRepositionActionData(float x, float y) {
        ActionData actionData = new ActionData();
        actionData.setType(ActionType.REPOSITION.getId());
        actionData.putFloat("actionValue_x", x);
        actionData.putFloat("actionValue_y", y);
        return actionData;
    }

    public static ActionData createScoreActionData(int score) {
        ActionData actionData = new ActionData();
        actionData.setType(ActionType.SCORE.getId());
        actionData.putInt("actionValue", score);
        return actionData;
    }

    public static ActionData createSpawnEntityActionData(EntityData entityData) {
        ActionData actionData = new ActionData();
        actionData.setType(ActionType.SPAWN_ENTITY.getId());
        actionData.putString("entityData", UtilityTool.getStringFromDataClass(entityData));
        return actionData;
    }

    private static ComponentData createComponentData() {
        ComponentData componentData = new ComponentData();
        componentData.setUseComponentPosition(false);
        componentData.setUsePositionAsOffset(false);
        componentData.setEnabled(true);
        return componentData;
    }
    
    public static ComponentData createCameraComponentData(float width, float height, boolean flipped) {
        ComponentData cameraData = createComponentData();
        cameraData.putFloat("width", width);
        cameraData.putFloat("height", height);
        cameraData.putBoolean("flipped", flipped);
        return cameraData;
    }

    public static ComponentData createPhysicsComponentData(float maxAccelerationX, float maxAccelerationY,
                                                           float maxVelocityX, float maxVelocityY,
                                                           float bounds_width, float bounds_height,
                                                           boolean collidable) {
        ComponentData physicsData = createComponentData();
        physicsData.setType(ComponentType.PHYSICS.getId());
        physicsData.putFloat("maxAccerlation_x", maxAccelerationX);
        physicsData.putFloat("maxAcceleration_y", maxAccelerationY);
        physicsData.putFloat("maxVeloity_x", maxVelocityX);
        physicsData.putFloat("maxVelocity_y", maxVelocityY);
{'fraction_non_alphanumeric': 0.08759856630824372, 'fraction_numerical': 0.0022939068100358423, 'mean_word_length': 3.1083627797408715, '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': 12, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4224176', 'n_tokens_mistral': 1859, 'n_tokens_neox': 1845, 'n_words': 340}