From 38200848953b1d8d7ba083752c2621603842b54e Mon Sep 17 00:00:00 2001 From: tslil clingman <> Date: Mon, 27 Jan 2020 22:16:59 -0800 Subject: fix ptn issues --- src/main.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index 8335422..6a2f70a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -101,10 +101,12 @@ fn init_gui(size: u8) -> GUI { fn human_action(gui: &GUI, game: &Game) -> Result { loop { let inp = gui.action_entry.read_action(); - match parse_action(&game, &inp) { - Err(err) => gui - .message_log - .log_error(format!("Input \"{}\": {}", inp, err)), + match parse_action(game.query_stone_owner(), &inp) { + Err(err) => { + gui.message_log + .log_error(format!("Input \"{}\": {}", inp, err)); + gui.action_entry.clear_entry_area(); + } Ok(action) => { gui.action_entry.clear_entry_area(); return Ok(action); -- cgit v1.3.1