//
// Created by m on 12/3/21.
//
#include "../engine/game/game.hpp"
#include "../engine/rendering/renderer.hpp"
#include "../engine/utility/camera.hpp"
#include "../engine/utility/grid2d.hpp"
#include <vector>
#include <range/v3/range.hpp>
#include <range/v3/view.hpp>
#ifndef RLA_IIPP_VISUALIZER_HPP
#define RLA_IIPP_VISUALIZER_HPP
#define MAP_SIZE_W 20
#define MAP_SIZE_H 20
#define TILE_WIDTH 48
#define TILE_HEIGHT 48
#define WALL_CHAR '#'
#define FLOOR_CHAR '.'

class Visualizer : public Game {
public:
    bool update(InputResult input) override;

    void render(Renderer* renderer) override;


    ~Visualizer();

    void initialize(GameInitArgs args) override;


private:
    int window_width = 0;
    int window_height = 0;
    Grid2D<char> tile_map = Grid2D<char>(0, 0);
    Camera camera = Camera();

    int x = 0;
    int y=0;
    int sprite_index = 1;

    void initialize_map(int width, int height);

};

#endif //RLA_IIPP_VISUALIZER_HPP
