Skip to content

Commit

Permalink
prepare for window size checks and update roadmap
Browse files Browse the repository at this point in the history
  • Loading branch information
boldandbrad committed Apr 18, 2024
1 parent 11a1a9b commit ab057cd
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/roadmap.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
12 changes: 11 additions & 1 deletion src/app.rs
Original file line number Diff line number Diff line change
@@ -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},
Expand Down Expand Up @@ -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();

Expand Down

0 comments on commit ab057cd

Please sign in to comment.