Print version in log

Release 0.2.0
This commit is contained in:
Artlef 2020-08-05 22:51:33 +02:00
parent ee7d52f401
commit 1fb3194786
4 changed files with 8 additions and 4 deletions

2
Cargo.lock generated
View File

@ -44,7 +44,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "clichess"
version = "0.1.0"
version = "0.2.0"
dependencies = [
"colored 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
"ctrlc 3.1.3 (registry+https://github.com/rust-lang/crates.io-index)",

View File

@ -1,6 +1,6 @@
[package]
name = "clichess"
version = "0.1.0"
version = "0.2.0"
authors = ["Artlef <artlef@localhost>"]
edition = "2018"

View File

@ -19,6 +19,8 @@ struct Client {
}
fn main() {
let version = env!("CARGO_PKG_VERSION");
println!("Running clichess version {}", version);
let username = std::env::args().nth(1).expect("no name given");
let public_key = std::env::args().nth(2).expect("no public key given");
//send username and public key to server
@ -41,8 +43,8 @@ fn main() {
let mut client = Client {
player: clichess::Player {
role: UserRole::Spectator,
username: username,
public_key: public_key,
username,
public_key,
},
side: Color::White,
input_buffer: input_buffer.clone(),

View File

@ -22,6 +22,8 @@ struct Server {
}
fn main() {
let version = env!("CARGO_PKG_VERSION");
println!("Running clichess version {}", version);
let chess = Arc::new(Mutex::new(Chess::default()));
let players = Arc::new(Mutex::new(HashMap::new()));
let mut counter = 0;