<commit_before>package commands.turtle_commands;

import commands.Command;
import commands.CommandOneInput;
import model.Model;
import model.State;

/**
 * Takes input pixels, changes x or y values based on
 * the angle orientation of the turtle.
 * Takes the orientation stored the model and uses the
 * orientation class to determine where to update the x and y
 * coordinates to using sin and cos. Angle starts at upper
 * y-axis.
 * @author carlosreyes
 *
 */
public class Forward extends CommandOneInput {
	@Override
	public double evaluate(Model model) {
		double orientation = model.getOrientation();
		double x = model.getX();
		double y = model.getY();
		double distance = getInputValueOne(model);
		System.out.println(distance);
		double newX = x + distance*Math.sin(Math.toRadians(orientation));
		double newY = y + distance*Math.cos(Math.toRadians(orientation));
		
		model.addState(new State(newX, newY, orientation, model.getTurtleVisible(), model.getPenVisible()));
		
		return getInputValueOne(model);
	}<commit_msg>testing<commit_after>package commands.turtle_commands;

import commands.Command;
import commands.CommandOneInput;
import model.Model;
import model.State;

/**
 * Takes input pixels, changes x or y values based on
 * the angle orientation of the turtle.
 * Takes the orientation stored the model and uses the
 * orientation class to determine where to update the x and y
 * coordinates to using sin and cos. Angle starts at upper
 * y-axis.
 * @author carlosreyes
 *
 */
public class Forward extends CommandOneInput {
	@Override
	public double evaluate(Model model) {
		double orientation = model.getOrientation();
		double x = model.getX();
		double y = model.getY();
		double distance = getInputValueOne(model);
		
		double newX = x + distance*Math.sin(Math.toRadians(orientation));
		double newY = y + distance*Math.cos(Math.toRadians(orientation));
		
		model.addState(new State(newX, newY, orientation, model.getTurtleVisible(), model.getPenVisible()));
		
		return getInputValueOne(model);
	}
{'fraction_non_alphanumeric': 0.09709216362740267, 'fraction_numerical': 0.0, 'mean_word_length': 4.686274509803922, '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': '1548472', 'n_tokens_mistral': 617, 'n_tokens_neox': 567, 'n_words': 195}