diff options
author | tom barrett <spalf0@gmail.com> | 2018-04-20 04:27:31 -0500 |
---|---|---|
committer | tom barrett <spalf0@gmail.com> | 2018-04-20 04:27:31 -0500 |
commit | a6f21e236f86bc9a9bdcf687ba1086c464d079bc (patch) | |
tree | 50b911e6d8a064fd3116334a6d7f19ac69618a16 /src/client | |
parent | aeaaefd2706479378a24c1ab6d1dc8f74d557e78 (diff) |
-moved mining_data init into function
Diffstat (limited to 'src/client')
-rw-r--r-- | src/client/mining.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/client/mining.rs b/src/client/mining.rs index 5cb1240..17a7819 100644 --- a/src/client/mining.rs +++ b/src/client/mining.rs @@ -23,8 +23,11 @@ pub fn client_mining(mut stream : TcpStream, mut buff_r : BufReader<TcpStream>) match data.has_astroid_target { true => match data.is_within_range { - true => write!(stdout, "{}Press F to begin mining.", termion::cursor::Goto(1,1)).unwrap(), - false => write!(stdout, "{}Astroid must be within range of {}.", termion::cursor::Goto(1,1), data.mining_range).unwrap(), + true => match data.status { + true => write!(stdout, "{}Press F to stop mining.", termion::cursor::Goto(1,1)).unwrap(), + false => write!(stdout, "{}Press F to begin mining.", termion::cursor::Goto(1,1)).unwrap(), + } + false => write!(stdout, "{}Astroid must be within range of {}.", termion::cursor::Goto(1,1), data.range).unwrap(), }, false => write!(stdout, "{}Ship has no astroid targeted.", termion::cursor::Goto(1,1)).unwrap(), } |