<commit_before>package chess.view.twod;

import chess.model.ChessGame;
import chess.model.Move;
import chess.model.Position;
import chess.view.twod.history.GameHistory;
import javafx.scene.layout.BorderPane;

/**
 * Container class for all view objects relating to the board
 */
public class ChessGameUI extends BorderPane {

    private Board gameBoard = new Board();
    private GameHistory gameHistory = new GameHistory();

    public ChessGameUI() {
        this.setCenter(gameBoard);
        this.setBottom(gameHistory);

        System.out.println("pad left: " + this.getPadding().getLeft());
        System.out.println("pad right: " + this.getPadding().getRight());
        System.out.println("pad bot: " + this.getPadding().getBottom());
        System.out.println("pad top: " + this.getPadding().getTop());
    }

    public void updateBoard(ChessGame game) {
        gameBoard.update(game);
    }

    public BoardPosition[][] getGrid() {
        return gameBoard.getGrid();
    }

    public BoardPosition getBoardPosition(Position position) {
        return  gameBoard.getBoardPosition(position);
    }

    public void addMove(int moveNumber, Move move) {
        gameHistory.addMove(moveNumber, move);
    }

    public void removeAllBoardSelections() {
        for (int i = 0; i < gameBoard.getGrid().length; i++) {
            for (BoardPosition position : gameBoard.getGrid()[i]) {
                position.select(false);
            }
        }
    }

    public void removeAllBoardHighlights() {
        for (int i = 0; i < gameBoard.getGrid().length; i++) {
            for (BoardPosition position : gameBoard.getGrid()[i]) {
                position.highlight(false);
            }
        }
    }
}
<commit_msg>created container for all UI components<commit_after>package chess.view.twod;

import chess.model.ChessGame;
import chess.model.Move;
import chess.model.Position;
import chess.view.twod.history.GameHistory;
import javafx.scene.layout.BorderPane;

/**
 * Container class for all view objects relating to the board
 */
public class ChessGameUI extends BorderPane {

    private Board gameBoard = new Board();
    private GameHistory gameHistory = new GameHistory();

    public ChessGameUI() {
        this.setCenter(gameBoard);
        this.setBottom(gameHistory);
    }

    public void updateBoard(ChessGame game) {
        gameBoard.update(game);
    }

    public BoardPosition[][] getGrid() {
        return gameBoard.getGrid();
    }

    public BoardPosition getBoardPosition(Position position) {
        return  gameBoard.getBoardPosition(position);
    }

    public void addMove(int moveNumber, Move move) {
        gameHistory.addMove(moveNumber, move);
    }

    public void removeAllBoardSelections() {
        for (int i = 0; i < gameBoard.getGrid().length; i++) {
            for (BoardPosition position : gameBoard.getGrid()[i]) {
                position.select(false);
            }
        }
    }

    public void removeAllBoardHighlights() {
        for (int i = 0; i < gameBoard.getGrid().length; i++) {
            for (BoardPosition position : gameBoard.getGrid()[i]) {
                position.highlight(false);
            }
        }
    }
}

{'fraction_non_alphanumeric': 0.11492816989381636, 'fraction_numerical': 0.0012492192379762648, 'mean_word_length': 2.677382319173364, 'pattern_counts': {'":': 0, '<': 7, '<?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': '7470070', 'n_tokens_mistral': 923, 'n_tokens_neox': 881, 'n_words': 207}