wordl 0.3.0

Terminal Wordle game. Web like with keyboard hints and slow reveal animations.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use ratatui::prelude::*;
use std::rc::Rc;

pub fn master_layout(frame: &mut Frame) -> Rc<[ratatui::layout::Rect]> {
    let size = frame.size();

    let constraints = if size.height >= 31 {
        vec![Constraint::Percentage(66), Constraint::Percentage(34)]
    } else {
        vec![Constraint::Percentage(100)]
    };

    Layout::default()
        .direction(Direction::Vertical)
        .constraints(constraints)
        .split(frame.size())
}