mod boot;
mod debug;
mod deck;
mod menu;
mod play;
mod setup;
mod view;

use bevy::prelude::*;

fn main() {
    let primary_window = Some(Window {
        // web: fill the window
        fit_canvas_to_parent: true,
        ..default()
    });
    App::new()
        .add_plugins(
            DefaultPlugins
                .set(ImagePlugin::default_nearest())
                .set(WindowPlugin {
                    primary_window,
                    ..default()
                }),
        )
        .add_plugins((
            view::ViewPlugin,
            deck::DeckPlugin,
            boot::BootPlugin,
            setup::SetupPlugin,
            play::PlayPlugin,
            menu::MenuPlugin,
            // debug::DebugPlugin,
        ))
        .init_state::<GameState>()
        .run();
}

#[derive(States, Default, Debug, Clone, PartialEq, Eq, Hash)]
pub(crate) enum GameState {
    #[default]
    Boot,
    Setup,
    Main,
}
