pub mod games;
pub mod pack_reveal;
pub mod packs;
pub mod party;
pub mod store;
use ratatui::prelude::*;
use crate::{game::GameRef, pack::Pack, state::State};
use super::action::{Action, Route};
pub enum MessageType {
Success,
Normal,
Error,
}
pub enum ViewResult {
None,
Redraw,
Navigate(Route),
OpenPack(Pack),
RevealPoints(u64),
RevealGame,
StartGame(GameRef),
Message(MessageType, String),
}
pub trait View {
fn render(&self, frame: &mut Frame, area: Rect, state: &State, tick: u32);
fn handle(&mut self, action: Action, state: &mut State) -> ViewResult;
fn key_hints(&self) -> Vec<(&'static str, &'static str)>;
}