summaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authorJustin Wernick <justin@worthe-it.co.za>2022-04-19 21:36:41 +0200
committerJustin Wernick <justin@worthe-it.co.za>2022-04-19 21:36:41 +0200
commitf8a0e0f7f2f9cd5fb69899b5d7037bc969df4339 (patch)
treefccd2b409974c350485b096858f8f5bf8dad915f /src/main.rs
parent2f23ab85adb7ffc5866cc948bad0c35a7d41a05b (diff)
Refile for merging repos
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs24
1 files changed, 0 insertions, 24 deletions
diff --git a/src/main.rs b/src/main.rs
deleted file mode 100644
index c5f7857..0000000
--- a/src/main.rs
+++ /dev/null
@@ -1,24 +0,0 @@
-use std::io::prelude::*;
-use std::io::stdin;
-
-use vroomba::command::Command;
-use vroomba::*;
-
-fn main() {
- for line in stdin().lock().lines() {
- let round_number = line
- .expect("Failed to read line from stdin: {}")
- .parse::<usize>()
- .expect("Round number was not an unsigned integer: {}");
- let command =
- match json::read_state_from_json_file(&format!("./rounds/{}/state.json", round_number))
- {
- Ok(state) => choose_command(round_number, &state),
- Err(e) => {
- eprintln!("WARN: State file could not be parsed: {}", e);
- Command::Nothing
- }
- };
- println!("C;{};{}", round_number, command);
- }
-}