<commit_before>package edu.knox.minecraft.plugintest;

import net.canarymod.api.world.position.Direction;
import net.canarymod.api.world.position.Position;

public class Turtle {
    
    //TODO:  Will we ever actually make a Turtle, or could this class be static?

    //Make a Turtle

    //Constructor

    /**
     * Move.  Returns new relative position of Turtle.
     * 
     * TODO:  check if canary handles vertical motion in a simpler way (particularly vertical diagonals)
     * Also, does this method need to take a distance, or are we just calling it multiple times?
     * 
     * @param p Initial relative position of turtle
     * @param d forward direction of turtle
     * @param up Is this move going up?
     * @param down Is this move going down?
     * @return New relative position of turtle.
     */
    public Position move (Position p, Direction d, boolean up, boolean down){ 

        int dn = d.getIntValue();  //get direction number

        /*TODO-- do we need to do something to make sure both up and down aren't true?
        As is stands, if up is true we just do that and don't check down, so it may not matter.*/

        //check if vertical motion
        if (up || down ){
            if (up)  {  //moving up
                //add y +1
                p.setY(p.getBlockY() + 1);<commit_msg>turtle constructor<commit_after>package edu.knox.minecraft.plugintest;

import net.canarymod.api.world.position.Direction;
import net.canarymod.api.world.position.Position;

public class Turtle {
    
    //TODO:  Will we ever actually make a Turtle, or could this class be static?

    //Make a Turtle

    //Constructor
    public Turtle(){
        //Nothing to a turtle
    }

    /**
     * Move.  Returns new relative position of Turtle.
     * 
     * TODO:  check if canary handles vertical motion in a simpler way (particularly vertical diagonals)
     * Also, does this method need to take a distance, or are we just calling it multiple times?
     * 
     * @param p Initial relative position of turtle
     * @param d forward direction of turtle
     * @param up Is this move going up?
     * @param down Is this move going down?
     * @return New relative position of turtle.
     */
    public Position move (Position p, Direction d, boolean up, boolean down){ 

        int dn = d.getIntValue();  //get direction number

        /*TODO-- do we need to do something to make sure both up and down aren't true?
        As is stands, if up is true we just do that and don't check down, so it may not matter.*/

        //check if vertical motion
        if (up || down ){
            if (up)  {  //moving up
                //add y +1
                p.setY(p.getBlockY() + 1);
{'fraction_non_alphanumeric': 0.08179808400884303, 'fraction_numerical': 0.0014738393515106854, 'mean_word_length': 2.2437275985663083, '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': '5213327', 'n_tokens_mistral': 799, 'n_tokens_neox': 744, 'n_words': 340}