//
// Created by sasha on 27.11.2025.
//

#ifndef RU_DANSOFT_PUZZLE15_GAMESCREEN_H
#define RU_DANSOFT_PUZZLE15_GAMESCREEN_H

#include <vector>

#include "engine/engine_typedef.h"
#include "engine/widgets/image.h"
#include "engine/widgets/text.h"
#include "engine/widgets/timer.h"

#include "widgets/board/board.h"
#include "widgets/modal_victory.h"
#include "engine/widgets/iscreen.h"

class GameScreen : public IScreen {
    public:
        GameScreen();

        void onActive(const VariantMap &args) override;

    private:
        //Screen *screen;

        Image *button_back;
        Image *turn;
        Image *time;
        Image *refresh;
        Image *circle;
        Text *text_circle;
        Board *board;

        Text *text_count_time;
        Text *text_count_turn;

        Timer *timer;

        ModalVictory *victory;

        int count_time;
        int count_turn;



        std::string curLevel;

        void onWon();

        // Пересоздать текст для count_time и count_turn
        void reInitCounters();

        void replay();

};


#endif //RU_DANSOFT_PUZZLE15_GAMESCREEN_H
