This commit is contained in:
parent
c3f27a7f94
commit
2cdd3aa886
6 changed files with 270 additions and 5 deletions
|
@ -8,7 +8,7 @@ fn main() {
|
|||
let mut app = App::new();
|
||||
|
||||
loop {
|
||||
terminal.draw(|frame| app.draw(frame));
|
||||
terminal.draw(|frame| app.draw(frame)).unwrap();
|
||||
|
||||
if event::poll(Duration::from_secs(0)).unwrap() {
|
||||
match event::read().unwrap() {
|
||||
|
@ -24,6 +24,10 @@ fn main() {
|
|||
code: event::KeyCode::Right,
|
||||
..
|
||||
}) => app.next_tab(),
|
||||
event::Event::Key(event::KeyEvent {
|
||||
code: event::KeyCode::Char(c),
|
||||
..
|
||||
}) => app.add_char_to_number_guess(c),
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue