diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/consulter.rs | 17 | ||||
| -rw-r--r-- | src/game.rs | 17 | ||||
| -rw-r--r-- | src/gui.rs | 19 | ||||
| -rw-r--r-- | src/main.rs | 30 | ||||
| -rw-r--r-- | src/parser.rs | 17 |
5 files changed, 94 insertions, 6 deletions
diff --git a/src/consulter.rs b/src/consulter.rs index 250fd1c..78fa07d 100644 --- a/src/consulter.rs +++ b/src/consulter.rs @@ -1,3 +1,20 @@ +/* + This file is part of Takwrap. + + Takwrap is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Foobar is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Foobar. If not, see <https://www.gnu.org/licenses/>. +*/ + use std::fs::{remove_file, File}; use std::io::{Error, ErrorKind, Result, Write}; use std::process::Command; diff --git a/src/game.rs b/src/game.rs index 18e6fe5..4a91755 100644 --- a/src/game.rs +++ b/src/game.rs @@ -1,3 +1,20 @@ +/* + This file is part of Takwrap. + + Takwrap is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Foobar is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Foobar. If not, see <https://www.gnu.org/licenses/>. +*/ + use std::collections::HashSet; use std::fmt; @@ -1,3 +1,20 @@ +/* + This file is part of Takwrap. + + Takwrap is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Foobar is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Foobar. If not, see <https://www.gnu.org/licenses/>. +*/ + extern crate pancurses; pub use pancurses::Input::*; @@ -770,7 +787,7 @@ impl GUI { return false; } else { self.message_log.log_error(format!( - "Cannot perform \"{}\": p{}", + "Cannot perform \"{}\": {}", act_string, e )); } diff --git a/src/main.rs b/src/main.rs index 31414b8..8ce24d2 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,3 +1,22 @@ +/* +Takwrap, a TUI for playing Tak and interacting with Tak engines. + +Copyright (C) 2020, tslil clingman + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + extern crate argparse; extern crate chrono; @@ -27,13 +46,14 @@ fn main() { let mut size: u8 = 5; let mut start_type_string = String::new(); + println!("Takwrap, a TUI for playing Tak and interacting with Tak engines.\n +Copyright (C) 2020, tslil clingman\n +This program comes with ABSOLUTELY NO WARRANTY; and is made available under the terms of the GNU GPL v3 license. This is free software, and you are welcome to redistribute it under certain conditions; see COPYING for details.\n" + ); + { let mut ap = ArgumentParser::new(); - ap.set_description( - "A TUI - implementation of and wrapper for engines for the game of - Tak.", - ); + ap.set_description(""); ap.refer(&mut p1_name).add_option( &["--player1"], diff --git a/src/parser.rs b/src/parser.rs index ba58b72..a134bb9 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -1,3 +1,20 @@ +/* + This file is part of Takwrap. + + Takwrap is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Foobar is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Foobar. If not, see <https://www.gnu.org/licenses/>. +*/ + use crate::game::*; fn parse_move(mv: &str) -> Result<Action, String> { |
