#ifndef __TILES__CHUNK_H__
#define __TILES__CHUNK_H__

#include "Tile.h"
#include <vector>
#include <cstdint>

constexpr int CHUNK_SIZE = 32;

struct Chunk
{
    std::vector<Tile> tiles;
    int chunkX = 0;
    int chunkY = 0;
    
    Chunk(int x = 0, int y = 0);
    
    Tile& GetTile(int localX, int localY);
    const Tile& GetTile(int localX, int localY) const;
    void SetTile(int localX, int localY, const Tile& tile);
    bool IsValid() const { return !tiles.empty(); }
};

#endif