<commit_before>package de.sebhn.algorithm.excercise1.helper.direction;


import de.sebhn.algorithm.excercise1.helper.Grid;
import de.sebhn.algorithm.excercise1.helper.Position;

public class LeftUp implements Walkable {

  public static Position getNewPosition(Position currentPosition, Grid grid) {
    Position newPosition = new Position(currentPosition.getX() - 1, currentPosition.getY() - 1);
    return newPosition;
  }

  public static boolean isAllowedToWalk(Position newPosition, Grid grid, Position currentPosition) {
    return Diagonal.isAboveOrOn(newPosition) && Diagonal.isAboveOrOn(newPosition)
        && grid.isInGrid(newPosition);
  }

}<commit_msg>fix horrible mistakes on leftup (works! :D)<commit_after>package de.sebhn.algorithm.excercise1.helper.direction;


import de.sebhn.algorithm.excercise1.helper.Grid;
import de.sebhn.algorithm.excercise1.helper.Position;

public class LeftUp implements Walkable {

  public static Position getNewPosition(Position currentPosition, Grid grid) {
    Position newPosition = new Position(currentPosition.getX() - 1, currentPosition.getY() + 1);
    return newPosition;
  }

  public static boolean isAllowedToWalk(Position newPosition, Grid grid, Position currentPosition) {
    return Diagonal.isAboveOrOn(newPosition) && Diagonal.isAboveOrOn(currentPosition)
        && grid.isInGrid(newPosition);
  }

}
{'fraction_non_alphanumeric': 0.09370424597364568, 'fraction_numerical': 0.007320644216691069, 'mean_word_length': 5.270642201834862, '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': '3401502', 'n_tokens_mistral': 420, 'n_tokens_neox': 399, 'n_words': 86}