diff --git a/docs/roadmap.md b/docs/roadmap.md index b804bb7..0a5e32a 100644 --- a/docs/roadmap.md +++ b/docs/roadmap.md @@ -15,6 +15,7 @@ often. - Implement game over/victory screens - Implement help screen - Ability to play a game of euchre with cpus +- Implement min screen size and handle window resizes gracefully - Event logging for debugging - Implement colors/emojis and text styling diff --git a/src/app.rs b/src/app.rs index af9cb02..f4c07bb 100644 --- a/src/app.rs +++ b/src/app.rs @@ -1,6 +1,9 @@ use crate::interface::{interface_callback::InterfaceCallback, Interface}; use crate::tui::Tui; -use crossterm::event::{Event, KeyCode, KeyEvent, KeyModifiers}; +use crossterm::{ + event::{Event, KeyCode, KeyEvent, KeyModifiers}, + // terminal::size, +}; use ratatui::prelude::{CrosstermBackend, Terminal}; use std::{ io::{stdout, Result}, @@ -35,6 +38,13 @@ impl App { let mut tui = Tui::new(terminal); tui.init()?; + // TODO: check and handle terminal size + // let (cols, rows) = size()?; + // println!("{}x{}", cols, rows); + // if cols < 120 || rows < 36 { + // self.is_running = false; + // } + // initialize tick tracker let mut last_tick = Instant::now();