#include "raylib.h"
#include "grid.h"

/* This is created by Dongkun Lee. Korean Attorney in Law. 
First Created at 12/28/2025 
Read "README.md" for detailed information.
*/


/* -------------------------------------------------------------
// Program main entry point
--------------------------------------------------------------- */
int main(void)
{
    // Initialization
    const int screenWidth = 300;
    const int screenHeight = 600;  // Cell Size is 30px. and There are 20 grid horizontally. 

    InitWindow(screenWidth, screenHeight, "Tetris - Hello!");
 
    Image icon = LoadImage("icon/seodang.png");
    SetWindowIcon(icon);

    SetTargetFPS(60);    
    Grid grid = Grid(); 

    // 그리고 세팅  
    grid.SetGridValue(4, 5, 2);
    grid.SetGridValue(4, 6, 2); 

    grid.Print();



    // Main game loop
    while (WindowShouldClose() == false)    // Detect window close button or ESC key
    {
        // Draw
        //----------------------------------------
        BeginDrawing();
 
            ClearBackground(DARKBLUE);
            grid.Draw();
            // DrawText("Hello There", 40, 200, 20, MAROON);  
  
        EndDrawing();
        //---------------------------------------

    }

    // De-Initialization
    CloseWindow();        // Close window and OpenGL context
    //--------------------------------------------------------------------------------------
 
    return 0;
}