#include "MainMenuState.h"
#include <iostream>

void MainMenuState::update() {
    // Handle updates like animations if necessary
}

void MainMenuState::init() {
    std::cout << "Main menu state initialized\n";
}

void MainMenuState::handleEvents(SDL_Event& event) {
    if (event.type == SDL_KEYDOWN) {
        switch (event.key.keysym.sym) {
        case SDLK_RETURN:
            std::cout << "Switching to game state\n";
            this->changeRoom("game");
            break;
        case SDLK_ESCAPE:
            std::cout << "Exiting game\n";
            this->changeRoom("exit");
            break;
        default:
            break;
        }
    }
}

void MainMenuState::render(SDL_Renderer* renderer) {
    SDL_SetRenderDrawColor(renderer, 0, 0, 0, SDL_ALPHA_OPAQUE);
    SDL_RenderClear(renderer);

    SDL_RenderPresent(renderer);
}
