<commit_before>#include <QDir>
#include <QtQml>
#include <QFile>
#include <QList>
#include <QQmlEngine>
#include <QQmlContext>
#include <QFileDialog>

#include <figureking.hpp>
#include <chessmodel.hpp>

#include "gameengine.hpp"
#include "movepoints.hpp"


GameEngine::GameEngine(QObject *parent)
    :QObject(parent)
    ,m_figures(new ChessModel(this))
    ,m_isWhite(true)
    ,m_lastClick(nullptr)
{
    qmlRegisterUncreatableType<FigureIntf>("com.znocpmp.chess", 1, 0, "Figure", "");
    qmlRegisterType<ChessModel>("com.znocpmp.chess", 1, 0, "ChessModel");
}

GameEngine::~GameEngine()
{
}

void GameEngine::setupBoard()
{
    // Rookes

    //bishops

    //Kings
    m_figures->addFigure(new FigureKing(8, 5, FigureIntf::Black));
    m_figures->addFigure(new FigureKing(1, 5, FigureIntf::White));
}

void GameEngine::load()
{

}

void GameEngine::move()
{

}
<commit_msg>Added board filling<commit_after>#include <QDir>
#include <QtQml>
#include <QFile>
#include <QList>
#include <QQmlEngine>
#include <QQmlContext>
#include <QFileDialog>

#include <figurerook.hpp>
#include <figureking.hpp>
#include <figurepawn.hpp>
#include <figurequeen.hpp>
#include <figureknight.hpp>
#include <figurebishop.hpp>

#include <chessmodel.hpp>

#include "gameengine.hpp"
#include "movepoints.hpp"


GameEngine::GameEngine(QObject *parent)
    :QObject(parent)
    ,m_figures(new ChessModel(this))
    ,m_isWhite(true)
    ,m_lastClick(nullptr)
{
    qmlRegisterUncreatableType<FigureIntf>("com.znocpmp.chess", 1, 0, "Figure", "");
    qmlRegisterType<ChessModel>("com.znocpmp.chess", 1, 0, "ChessModel");
}

GameEngine::~GameEngine()
{
}

void GameEngine::setupBoard()
{

    for(int row = 0; row < 2; row++)
    {
        FigureIntf::Color color = row == 0 ? FigureIntf::Black : FigureIntf::White;
        int place = 8 - 7 * row;

        // Pawns
        for (int count = 1; count < 9; count++)
            m_figures->addFigure(new FigurePawn(place + (row == 0 ? -1 : 1), count,
                                                color));

        // Rooks
        m_figures->addFigure(new FigureRook(place, 1, color));
        m_figures->addFigure(new FigureRook(place, 8, color));

        // Bishops
        m_figures->addFigure(new FigureBishop(place, 3, color));
        m_figures->addFigure(new FigureBishop(place, 6, color));

        // Knights
        m_figures->addFigure(new FigureKnight(place, 2, color));
        m_figures->addFigure(new FigureKnight(place, 7, color));

        // Queen
        m_figures->addFigure(new FigureQueen(place, 4, color));

        // King
        m_figures->addFigure(new FigureKing(place, 5, color));
    }
}

void GameEngine::load()
{

}

void GameEngine::move()
{

}

{'fraction_non_alphanumeric': 0.1541019955654102, 'fraction_numerical': 0.011086474501108648, 'mean_word_length': 3.6194539249146755, 'pattern_counts': {'":': 0, '<': 32, '<?xml version=': 0, '>': 41, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5478174', 'n_tokens_mistral': 1008, 'n_tokens_neox': 958, 'n_words': 181}