<commit_before>package com.java.laiy.model;

import com.java.laiy.model.exceptions.InvalidPointException;

public class Board {

    private static final int MIN_COORDINATE = 0;

    private static final int DEFAULT_BOARD_SIZE = 3;

    private final Figure[][] figures;

    public Board() {
        this(DEFAULT_BOARD_SIZE);
    }

    public Board(final int customBoardSize) {
        if (customBoardSize < DEFAULT_BOARD_SIZE) {
            this.figures = new Figure[DEFAULT_BOARD_SIZE][DEFAULT_BOARD_SIZE];
        }
         else {
            this.figures = new Figure[customBoardSize][customBoardSize];
        }
    }

    public void setFigure(final int x, final int y, final Figure figure) throws InvalidPointException {
        if (!checkCoordinates(x, y)) {
            throw new InvalidPointException();
        }
        else {
            figures[x][y] = figure;
        }
    }

    public Figure getFigure(final int x, final int y) throws InvalidPointException{
        if (!checkCoordinates(x, y)) {
            throw new InvalidPointException();
        }
        else {
            return figures[x][y];
        }
    }

    public Figure[][] getFiguresArray() {
            return figures;
    }

    public int getRowLength(final int row) {
        return figures[row].length;
    }

    private boolean checkCoordinates(final int x, final int y){
        return (checkCoordinate(x) && checkCoordinate(y));
    }

    public boolean checkCoordinate(final int coordinate) {
        return !(coordinate < MIN_COORDINATE || coordinate > figures.length - 1);
    }

}<commit_msg>Board updated<commit_after>package com.java.laiy.model;

import com.java.laiy.helpers.CoordinateHelper;
import com.java.laiy.model.exceptions.InvalidPointException;

public class Board {

    private static final int DEFAULT_BOARD_SIZE = 3;

    private final Figure[][] figures;

    public Board() {
        this(DEFAULT_BOARD_SIZE);
    }

    public Board(final int customBoardSize) {
        if (customBoardSize < DEFAULT_BOARD_SIZE) {
            this.figures = new Figure[DEFAULT_BOARD_SIZE][DEFAULT_BOARD_SIZE];
        }
         else {
            this.figures = new Figure[customBoardSize][customBoardSize];
        }
    }

    public void setFigure(final int x, final int y, final Figure figure) throws InvalidPointException {
        if (!CoordinateHelper.checkCoordinates(x, y)) {
            throw new InvalidPointException();
        }
        else {
            figures[x][y] = figure;
        }
    }

    public Figure getFigure(final int x, final int y) throws InvalidPointException{
        if (!CoordinateHelper.checkCoordinates(x, y)) {
            throw new InvalidPointException();
        }
        else {
            return figures[x][y];
        }
    }

    public Figure[][] getFiguresArray() {
            return figures;
    }

    public int getRowLength(final int row) {
        return figures[row].length;
    }

}
{'fraction_non_alphanumeric': 0.09331523583305056, 'fraction_numerical': 0.0013573125212080082, 'mean_word_length': 2.3885057471264366, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 4, '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': '5305782', 'n_tokens_mistral': 842, 'n_tokens_neox': 812, 'n_words': 205}