summaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs
new file mode 100644
index 0000000..a673753
--- /dev/null
+++ b/src/main.rs
@@ -0,0 +1,38 @@
+mod doublebuffer;
+mod nn;
+mod trainer;
+mod game;
+mod gui;
+
+fn main() {
+ /*let (cols, rows) = (36, 12);
+ let mut game = JumpGame::new(cols, rows);
+ println!("\x1b[1;1H\x1b[2J");
+
+ while let Some(status) = game.update() {
+ /*print!("\x1b[1;1H");
+ for row in 0..rows {
+ for col in 0..cols {
+ print!("{}", status.fields[((rows - row - 1) + col * rows) as usize].repr());
+ }
+ println!("");
+ }
+ std::thread::sleep_ms(80);*/
+ }*/
+
+ /*let (cols, rows) = (18, 16);
+ let game = game::JumpGame::new(cols, rows, 3);
+ gui::Gui::new()
+ .run(game);
+ return;*/
+ /*let mut n = nn::Nn::new_by_game_res(cols, rows);
+ let points = n.execute(game);
+ println!("{}", points);*/
+ /*let mut n = nn::Nn::new_by_game_res(cols, rows, &nn::Nn::new_random);
+ let game = n.execute_logged(game);
+ gui::Gui::new()
+ .run(game);*/
+
+ trainer::train();
+ //gui::Gui::run(game::JumpGame::new(18, 16, 4)).join().unwrap()
+}