diff --git a/Cargo.lock b/Cargo.lock index 9d5c6dc..e0a3aa2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -552,7 +552,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "447660ad36a13288b1db4d4248e857b510e8c3a225c822ba4fb748c0aafecffd" [[package]] -name = "xiv_craft_solver" +name = "xiv_craft_solver_lib" version = "0.1.2" dependencies = [ "clap", diff --git a/Cargo.toml b/Cargo.toml index cce3c8a..df8eb9d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "xiv_craft_solver" +name = "xiv_craft_solver_lib" version = "0.1.2" edition = "2021" authors = ["谭俊健","Dandaedre"] @@ -22,14 +22,14 @@ panic = 'abort' opt-level = 3 lto = true -# [lib] -# name = "xiv_craft_solver" -# path = "src/lib/libs.rs" -# crate-type = ["cdylib"] +[lib] +name = "xiv_craft_solver_lib" +path = "src/lib.rs" +crate-type = ["cdylib"] -# [[bin]] -# name = "xiv_craft_solver" -# path = "src/main.rs" +[[bin]] +name = "xiv_craft_solver" +path = "src/bin/bin.rs" [tool.maturin] python-source = "python" \ No newline at end of file diff --git a/results.txt b/results.txt deleted file mode 100644 index 3379561..0000000 --- a/results.txt +++ /dev/null @@ -1,115 +0,0 @@ - 20 - 11074/12628 - ["muscleMemory", "manipulation", "veneration", "wasteNot2", "groundwork", "groundwork", "basicSynth", "innovation", "preparatoryTouch", "basicTouch", "standardTouch", "advancedTouch", "innovation", "prudentTouch", "prudentTouch", "basicTouch", "standardTouch", "innovation", "prudentTouch", "trainedFinesse", "greatStrides", "byregotsBlessing", "basicSynth2"] - - 8 - Quality: 11074/12628 - ["muscleMemory", "manipulation", "veneration", "wasteNot2", "groundwork", "groundwork", "basicSynth", "innovation", "preparatoryTouch", "basicTouch", "standardTouch", "advancedTouch", "innovation", "prudentTouch", "prudentTouch", "basicTouch", "standardTouch", "innovation", "prudentTouch", "trainedFinesse", "greatStrides", "byregotsBlessing", "basicSynth2"] - - 7 - 11074/12628 - ["muscleMemory", "manipulation", "veneration", "wasteNot2", "groundwork", "groundwork", "basicSynth", "innovation", "preparatoryTouch", "basicTouch", "standardTouch", "advancedTouch", "innovation", "prudentTouch", "prudentTouch", "basicTouch", "standardTouch", "innovation", "prudentTouch", "trainedFinesse", "greatStrides", "byregotsBlessing", "basicSynth2"] - - - Bir6 - [P2] Found 305 solutions, sorting - [P2] [Muscle Memory, Manipulation, Veneration, Groundwork, Delicate Synthesis, Delicate Synthesis, Delicate Synthesis, Careful Synthesis, Innovation, Prudent Touch, Prudent Touch, Manipulation, Prudent Touch, Innovation, Basic Touch, Standard Touch, Advanced Touch, Great Strides, Innovation, Byregot's Blessing] p:90% q:68% d:15 - [P2] [Muscle Memory, Manipulation, Veneration, Groundwork, Delicate Synthesis, Delicate Synthesis, Careful Synthesis, Delicate Synthesis, Innovation, Prudent Touch, Prudent Touch, Manipulation, Prudent Touch, Innovation, Basic Touch, Standard Touch, Advanced Touch, Great Strides, Innovation, Byregot's Blessing] p:92% q:68% d:15 - [P2] [Muscle Memory, Manipulation, Veneration, Groundwork, Delicate Synthesis, Careful Synthesis, Delicate Synthesis, Delicate Synthesis, Innovation, Prudent Touch, Prudent Touch, Manipulation, Prudent Touch, Innovation, Basic Touch, Standard Touch, Advanced Touch, Great Strides, Innovation, Byregot's Blessing] p:92% q:68% d:15 - [P2] [Muscle Memory, Manipulation, Veneration, Groundwork, Careful Synthesis, Delicate Synthesis, Delicate Synthesis, Delicate Synthesis, Innovation, Prudent Touch, Prudent Touch, Manipulation, Prudent Touch, Innovation, Basic Touch, Standard Touch, Advanced Touch, Great Strides, Innovation, Byregot's Blessing] p:92% q:68% d:15 - [F] Top route { step_count: 22, progression: "4800/5060", quality: "11074/12628", durability: "-5/70", actions: [Muscle Memory, Manipulation, Veneration, Waste Not II, Groundwork, Groundwork, Basic Synthesis, Innovation, Preparatory Touch, Basic Touch, Standard Touch, Advanced Touch, Innovation, Prudent Touch, Prudent Touch, Basic Touch, Standard Touch, Innovation, Prudent Touch, Trained Finesse, Great Strides, Byregot's Blessing] } - Quality: 11074/12628 - ["muscleMemory", "manipulation", "veneration", "wasteNot2", "groundwork", "groundwork", "basicSynth", "innovation", "preparatoryTouch", "basicTouch", "standardTouch", "advancedTouch", "innovation", "prudentTouch", "prudentTouch", "basicTouch", "standardTouch", "innovation", "prudentTouch", "trainedFinesse", "greatStrides", "byregotsBlessing", "basicSynth2"] - - Program finished sucessfuly in 56s and found 305 solutions, [prog:5060] - Press enter to exit... - - Bir8 - [P2] Found 305 solutions, sorting - [P2] [Muscle Memory, Manipulation, Veneration, Groundwork, Delicate Synthesis, Delicate Synthesis, Delicate Synthesis, Careful Synthesis, Innovation, Prudent Touch, Prudent Touch, Manipulation, Prudent Touch, Innovation, Basic Touch, Standard Touch, Advanced Touch, Great Strides, Innovation, Byregot's Blessing] p:90% q:68% d:15 - [P2] [Muscle Memory, Manipulation, Veneration, Groundwork, Delicate Synthesis, Delicate Synthesis, Careful Synthesis, Delicate Synthesis, Innovation, Prudent Touch, Prudent Touch, Manipulation, Prudent Touch, Innovation, Basic Touch, Standard Touch, Advanced Touch, Great Strides, Innovation, Byregot's Blessing] p:92% q:68% d:15 - [P2] [Muscle Memory, Manipulation, Veneration, Groundwork, Delicate Synthesis, Careful Synthesis, Delicate Synthesis, Delicate Synthesis, Innovation, Prudent Touch, Prudent Touch, Manipulation, Prudent Touch, Innovation, Basic Touch, Standard Touch, Advanced Touch, Great Strides, Innovation, Byregot's Blessing] p:92% q:68% d:15 - [P2] [Muscle Memory, Manipulation, Veneration, Groundwork, Careful Synthesis, Delicate Synthesis, Delicate Synthesis, Delicate Synthesis, Innovation, Prudent Touch, Prudent Touch, Manipulation, Prudent Touch, Innovation, Basic Touch, Standard Touch, Advanced Touch, Great Strides, Innovation, Byregot's Blessing] p:92% q:68% d:15 - [P2] [Muscle Memory, Manipulation, Waste Not II, Waste Not II, Groundwork, Delicate Synthesis, Groundwork, Groundwork] p:90% q:2% d:45 - [P2] [Muscle Memory, Manipulation, Waste Not II, Waste Not II, Groundwork, Careful Synthesis, Groundwork, Groundwork] p:94% q:0% d:45 - [P2] [Muscle Memory, Manipulation, Waste Not II, Waste Not II, Groundwork, Basic Synthesis, Groundwork, Groundwork] p:91% q:0% d:45 - [P2] [Muscle Memory, Manipulation, Waste Not II, Waste Not II, Groundwork, Groundwork, Delicate Synthesis, Groundwork] p:90% q:2% d:45 - [P2] [Muscle Memory, Manipulation, Waste Not II, Waste Not II, Groundwork, Groundwork, Careful Synthesis, Groundwork] p:94% q:0% d:45 - [P2] [Muscle Memory, Manipulation, Waste Not II, Waste Not II, Groundwork, Groundwork, Basic Synthesis, Groundwork] p:91% q:0% d:45 - [P2] [Muscle Memory, Manipulation, Waste Not II, Waste Not II, Groundwork, Groundwork, Groundwork, Basic Synthesis] p:91% q:0% d:45 - [P2] [Muscle Memory, Manipulation, Waste Not II, Waste Not II, Groundwork, Groundwork, Groundwork, Careful Synthesis] p:94% q:0% d:45 - [P2] [Muscle Memory, Manipulation, Waste Not II, Waste Not II, Groundwork, Groundwork, Groundwork, Delicate Synthesis] p:90% q:2% d:45 - [F] Top route { step_count: 22, progression: "4800/5060", quality: "11074/12628", durability: "-5/70", actions: [Muscle Memory, Manipulation, Veneration, Waste Not II, Groundwork, Groundwork, Basic Synthesis, Innovation, Preparatory Touch, Basic Touch, Standard Touch, Advanced Touch, Innovation, Prudent Touch, Prudent Touch, Basic Touch, Standard Touch, Innovation, Prudent Touch, Trained Finesse, Great Strides, Byregot's Blessing] } - Quality: 11074/12628 - ["muscleMemory", "manipulation", "veneration", "wasteNot2", "groundwork", "groundwork", "basicSynth", "innovation", "preparatoryTouch", "basicTouch", "standardTouch", "advancedTouch", "innovation", "prudentTouch", "prudentTouch", "basicTouch", "standardTouch", "innovation", "prudentTouch", "trainedFinesse", "greatStrides", "byregotsBlessing", "basicSynth2"] - - Program finished sucessfuly in 26s and found 305 solutions, [prog:5060] - Press enter to exit... - - Bir10 - [P2] Found 305 solutions, sorting - [P2] [Muscle Memory, Manipulation, Veneration, Groundwork, Delicate Synthesis, Delicate Synthesis, Delicate Synthesis, Careful Synthesis] p:90% q:6% d:20 - [P2] [Muscle Memory, Manipulation, Veneration, Groundwork, Delicate Synthesis, Delicate Synthesis, Delicate Synthesis, Prudent Synthesis] p:90% q:6% d:25 - [P2] [Muscle Memory, Manipulation, Veneration, Groundwork, Delicate Synthesis, Delicate Synthesis, Prudent Synthesis, Delicate Synthesis] p:92% q:6% d:25 - [P2] [Muscle Memory, Manipulation, Veneration, Groundwork, Delicate Synthesis, Delicate Synthesis, Careful Synthesis, Delicate Synthesis] p:92% q:6% d:20 - [P2] [Muscle Memory, Manipulation, Veneration, Groundwork, Delicate Synthesis, Prudent Synthesis, Delicate Synthesis, Delicate Synthesis] p:92% q:6% d:25 - [P2] [Muscle Memory, Manipulation, Veneration, Groundwork, Delicate Synthesis, Careful Synthesis, Delicate Synthesis, Delicate Synthesis] p:92% q:6% d:20 - [P2] [Muscle Memory, Manipulation, Veneration, Groundwork, Prudent Synthesis, Delicate Synthesis, Delicate Synthesis, Delicate Synthesis] p:92% q:6% d:25 - [P2] [Muscle Memory, Manipulation, Veneration, Groundwork, Careful Synthesis, Delicate Synthesis, Delicate Synthesis, Delicate Synthesis] p:92% q:6% d:20 - [P2] [Muscle Memory, Manipulation, Waste Not II, Groundwork, Basic Synthesis, Basic Synthesis, Groundwork, Groundwork] p:97% q:0% d:40 - [P2] [Muscle Memory, Manipulation, Waste Not II, Groundwork, Basic Synthesis, Groundwork, Basic Synthesis, Groundwork] p:97% q:0% d:40 - [P2] [Muscle Memory, Manipulation, Waste Not II, Groundwork, Groundwork, Basic Synthesis, Basic Synthesis, Groundwork] p:97% q:0% d:40 - [P2] [Muscle Memory, Manipulation, Waste Not II, Waste Not, Groundwork, Delicate Synthesis, Groundwork, Groundwork] p:90% q:2% d:45 - [P2] [Muscle Memory, Manipulation, Waste Not II, Waste Not, Groundwork, Careful Synthesis, Groundwork, Groundwork] p:94% q:0% d:45 - [P2] [Muscle Memory, Manipulation, Waste Not II, Waste Not, Groundwork, Basic Synthesis, Groundwork, Groundwork] p:91% q:0% d:45 - [P2] [Muscle Memory, Manipulation, Waste Not II, Waste Not, Groundwork, Groundwork, Delicate Synthesis, Groundwork] p:90% q:2% d:45 - [P2] [Muscle Memory, Manipulation, Waste Not II, Waste Not, Groundwork, Groundwork, Careful Synthesis, Groundwork] p:94% q:0% d:45 - [P2] [Muscle Memory, Manipulation, Waste Not II, Waste Not, Groundwork, Groundwork, Basic Synthesis, Groundwork] p:91% q:0% d:45 - [P2] [Muscle Memory, Manipulation, Waste Not II, Waste Not, Groundwork, Groundwork, Groundwork, Basic Synthesis] p:91% q:0% d:45 - [P2] [Muscle Memory, Manipulation, Waste Not II, Waste Not, Groundwork, Groundwork, Groundwork, Careful Synthesis] p:94% q:0% d:45 - [P2] [Muscle Memory, Manipulation, Waste Not II, Waste Not, Groundwork, Groundwork, Groundwork, Delicate Synthesis] p:90% q:2% d:45 - [P2] [Muscle Memory, Manipulation, Waste Not II, Waste Not II, Groundwork, Delicate Synthesis, Groundwork, Groundwork] p:90% q:2% d:45 - [P2] [Muscle Memory, Manipulation, Waste Not II, Waste Not II, Groundwork, Careful Synthesis, Groundwork, Groundwork] p:94% q:0% d:45 - [P2] [Muscle Memory, Manipulation, Waste Not II, Waste Not II, Groundwork, Basic Synthesis, Groundwork, Groundwork] p:91% q:0% d:45 - [P2] [Muscle Memory, Manipulation, Waste Not II, Waste Not II, Groundwork, Groundwork, Delicate Synthesis, Groundwork] p:90% q:2% d:45 - [P2] [Muscle Memory, Manipulation, Waste Not II, Waste Not II, Groundwork, Groundwork, Careful Synthesis, Groundwork] p:94% q:0% d:45 - [P2] [Muscle Memory, Manipulation, Waste Not II, Waste Not II, Groundwork, Groundwork, Basic Synthesis, Groundwork] p:91% q:0% d:45 - [P2] [Muscle Memory, Manipulation, Waste Not II, Waste Not II, Groundwork, Groundwork, Groundwork, Basic Synthesis] p:91% q:0% d:45 - [P2] [Muscle Memory, Manipulation, Waste Not II, Waste Not II, Groundwork, Groundwork, Groundwork, Careful Synthesis] p:94% q:0% d:45 - [P2] [Muscle Memory, Manipulation, Waste Not II, Waste Not II, Groundwork, Groundwork, Groundwork, Delicate Synthesis] p:90% q:2% d:45 - [P2] [Muscle Memory, Manipulation, Waste Not, Groundwork, Careful Synthesis, Careful Synthesis, Groundwork, Basic Synthesis] p:91% q:0% d:40 - [P2] [Muscle Memory, Manipulation, Waste Not, Groundwork, Careful Synthesis, Careful Synthesis, Groundwork, Careful Synthesis] p:94% q:0% d:40 - [P2] [Muscle Memory, Manipulation, Waste Not, Groundwork, Careful Synthesis, Basic Synthesis, Groundwork, Careful Synthesis] p:91% q:0% d:40 - [P2] [Muscle Memory, Manipulation, Waste Not, Groundwork, Careful Synthesis, Groundwork, Careful Synthesis, Basic Synthesis] p:91% q:0% d:40 - [P2] [Muscle Memory, Manipulation, Waste Not, Groundwork, Careful Synthesis, Groundwork, Careful Synthesis, Careful Synthesis] p:94% q:0% d:40 - [P2] [Muscle Memory, Manipulation, Waste Not, Groundwork, Careful Synthesis, Groundwork, Basic Synthesis, Careful Synthesis] p:91% q:0% d:40 - [P2] [Muscle Memory, Manipulation, Waste Not, Groundwork, Basic Synthesis, Careful Synthesis, Groundwork, Careful Synthesis] p:91% q:0% d:40 - [P2] [Muscle Memory, Manipulation, Waste Not, Groundwork, Basic Synthesis, Groundwork, Careful Synthesis, Careful Synthesis] p:91% q:0% d:40 - [P2] [Muscle Memory, Manipulation, Waste Not, Groundwork, Groundwork, Careful Synthesis, Careful Synthesis, Basic Synthesis] p:91% q:0% d:40 - [P2] [Muscle Memory, Manipulation, Waste Not, Groundwork, Groundwork, Careful Synthesis, Careful Synthesis, Careful Synthesis] p:94% q:0% d:40 - [P2] [Muscle Memory, Manipulation, Waste Not, Groundwork, Groundwork, Careful Synthesis, Basic Synthesis, Careful Synthesis] p:91% q:0% d:40 - [P2] [Muscle Memory, Manipulation, Waste Not, Groundwork, Groundwork, Basic Synthesis, Careful Synthesis, Careful Synthesis] p:91% q:0% d:40 - [P2] [Muscle Memory, Manipulation, Waste Not, Waste Not, Groundwork, Delicate Synthesis, Groundwork, Groundwork] p:90% q:2% d:45 - [P2] [Muscle Memory, Manipulation, Waste Not, Waste Not, Groundwork, Careful Synthesis, Groundwork, Groundwork] p:94% q:0% d:45 - [P2] [Muscle Memory, Manipulation, Waste Not, Waste Not, Groundwork, Basic Synthesis, Groundwork, Groundwork] p:91% q:0% d:45 - [P2] [Muscle Memory, Manipulation, Waste Not, Waste Not, Groundwork, Groundwork, Delicate Synthesis, Groundwork] p:90% q:2% d:45 - [P2] [Muscle Memory, Manipulation, Waste Not, Waste Not, Groundwork, Groundwork, Careful Synthesis, Groundwork] p:94% q:0% d:45 - [P2] [Muscle Memory, Manipulation, Waste Not, Waste Not, Groundwork, Groundwork, Basic Synthesis, Groundwork] p:91% q:0% d:45 - [P2] [Muscle Memory, Manipulation, Waste Not, Waste Not, Groundwork, Groundwork, Groundwork, Basic Synthesis] p:91% q:0% d:45 - [P2] [Muscle Memory, Manipulation, Waste Not, Waste Not, Groundwork, Groundwork, Groundwork, Careful Synthesis] p:94% q:0% d:45 - [P2] [Muscle Memory, Manipulation, Waste Not, Waste Not, Groundwork, Groundwork, Groundwork, Delicate Synthesis] p:90% q:2% d:45 - [P2] [Muscle Memory, Manipulation, Waste Not, Waste Not II, Groundwork, Delicate Synthesis, Groundwork, Groundwork] p:90% q:2% d:45 - [P2] [Muscle Memory, Manipulation, Waste Not, Waste Not II, Groundwork, Careful Synthesis, Groundwork, Groundwork] p:94% q:0% d:45 - [P2] [Muscle Memory, Manipulation, Waste Not, Waste Not II, Groundwork, Basic Synthesis, Groundwork, Groundwork] p:91% q:0% d:45 - [P2] [Muscle Memory, Manipulation, Waste Not, Waste Not II, Groundwork, Groundwork, Delicate Synthesis, Groundwork] p:90% q:2% d:45 - [P2] [Muscle Memory, Manipulation, Waste Not, Waste Not II, Groundwork, Groundwork, Careful Synthesis, Groundwork] p:94% q:0% d:45 - [P2] [Muscle Memory, Manipulation, Waste Not, Waste Not II, Groundwork, Groundwork, Basic Synthesis, Groundwork] p:91% q:0% d:45 - [P2] [Muscle Memory, Manipulation, Waste Not, Waste Not II, Groundwork, Groundwork, Groundwork, Basic Synthesis] p:91% q:0% d:45 - [P2] [Muscle Memory, Manipulation, Waste Not, Waste Not II, Groundwork, Groundwork, Groundwork, Careful Synthesis] p:94% q:0% d:45 - [P2] [Muscle Memory, Manipulation, Waste Not, Waste Not II, Groundwork, Groundwork, Groundwork, Delicate Synthesis] p:90% q:2% d:45 - [F] Top route { step_count: 22, progression: "4800/5060", quality: "11074/12628", durability: "-5/70", actions: [Muscle Memory, Manipulation, Veneration, Waste Not II, Groundwork, Groundwork, Basic Synthesis, Innovation, Preparatory Touch, Basic Touch, Standard Touch, Advanced Touch, Innovation, Prudent Touch, Prudent Touch, Basic Touch, Standard Touch, Innovation, Prudent Touch, Trained Finesse, Great Strides, Byregot's Blessing] } - Quality: 11074/12628 - ["muscleMemory", "manipulation", "veneration", "wasteNot2", "groundwork", "groundwork", "basicSynth", "innovation", "preparatoryTouch", "basicTouch", "standardTouch", "advancedTouch", "innovation", "prudentTouch", "prudentTouch", "basicTouch", "standardTouch", "innovation", "prudentTouch", "trainedFinesse", "greatStrides", "byregotsBlessing", "basicSynth2"] - - Program finished sucessfuly in 13s and found 305 solutions, [prog:5060] - Press enter to exit... diff --git a/src/utils/action.rs b/src/action.rs similarity index 99% rename from src/utils/action.rs rename to src/action.rs index cb2089c..84c6d1a 100644 --- a/src/utils/action.rs +++ b/src/action.rs @@ -2,8 +2,8 @@ use std::fmt::Debug; use lazy_static::lazy_static; -use crate::utils::craft::Craft; -use crate::utils::specs::{Buff, Success}; +use crate::craft::Craft; +use crate::specs::{Buff, Success}; pub struct Action { pub name: String, diff --git a/src/bin/bin.rs b/src/bin/bin.rs new file mode 100644 index 0000000..5e54b26 --- /dev/null +++ b/src/bin/bin.rs @@ -0,0 +1,25 @@ +// // #![warn(missing_docs,unsafe_code,unstable_features,)] +// #[allow(dead_code)] + +// use clap::Parser; +// use xiv_craft_solver_lib; + +// #[derive(Debug)] +// struct CustomError(String); + +// fn main() { +// let args = xiv_craft_solver_lib::Args::parse(); +// let params = xiv_craft_solver_lib::Parameters{ +// depth: args.depth, +// threads: args.threads, +// verbose: args.verbose, +// }; + +// let (recipe,stats) = xiv_craft_solver_lib::load_from_config(&args.recipe_name, &args.file_name, &args.character_name); +// xiv_craft_solver_lib::solve_craft(recipe,stats,params); + +// () +// } +fn main() { + unimplemented!(); +} \ No newline at end of file diff --git a/src/utils/craft.rs b/src/craft.rs similarity index 96% rename from src/utils/craft.rs rename to src/craft.rs index 0773c57..242d66e 100644 --- a/src/utils/craft.rs +++ b/src/craft.rs @@ -1,7 +1,7 @@ use std::fmt::{Debug, Formatter,Display}; -use crate::utils::action::Action; -use crate::utils::specs::{Buff, BuffState, Recipe, Stats, Success}; -use crate::utils::Parameters; +use crate::action::Action; +use crate::specs::{Buff, BuffState, Recipe, Stats, Success}; +use crate::Parameters; #[derive(Clone)] diff --git a/src/utils.rs b/src/lib.rs similarity index 96% rename from src/utils.rs rename to src/lib.rs index 4381ecd..8aa5c31 100644 --- a/src/utils.rs +++ b/src/lib.rs @@ -1,4 +1,4 @@ -use crate::utils::{ +use crate::{ craft::Craft, specs::{Recipe,Stats}, }; @@ -6,6 +6,7 @@ use std::time::{Instant}; use threadpool::ThreadPool; use std::sync::{Arc,Mutex}; use clap::Parser; +use pyo3::prelude::*; mod solver; mod specs; @@ -48,6 +49,18 @@ pub struct Args { pub threads: usize, } +#[pyfunction] +pub fn pouet()-> &'static str { + return "pouet"; +} + +/// A Python module implemented in Rust. +#[pymodule] +fn xiv_craft_solver_lib(_py: Python, m: &PyModule) -> PyResult<()> { + m.add_function(wrap_pyfunction!(pouet, m)?)?; + Ok(()) +} + /// Solve the craft with given arguments pub fn solve_craft<'a>(recipe: Recipe, stats: Stats, params: Parameters) -> Option>>{ // Load the craft with given arguments diff --git a/src/main.rs b/src/main.rs deleted file mode 100644 index 5a9f784..0000000 --- a/src/main.rs +++ /dev/null @@ -1,22 +0,0 @@ -// #![warn(missing_docs,unsafe_code,unstable_features,)] -#[allow(dead_code)] - -use clap::Parser; -mod utils; - -#[derive(Debug)] -struct CustomError(String); - -fn main() { - let args = utils::Args::parse(); - let params = utils::Parameters{ - depth: args.depth, - threads: args.threads, - verbose: args.verbose, - }; - - let (recipe,stats) = utils::load_from_config(&args.recipe_name, &args.file_name, &args.character_name); - utils::solve_craft(recipe,stats,params); - - () -} diff --git a/src/utils/solver.rs b/src/solver.rs similarity index 98% rename from src/utils/solver.rs rename to src/solver.rs index 7ac92bb..2730936 100644 --- a/src/utils/solver.rs +++ b/src/solver.rs @@ -1,8 +1,8 @@ use std::collections::VecDeque; use std::ops::Not; -use crate::utils::action::{Action, ACTIONS}; -use crate::utils::craft::Craft; -use crate::utils::specs::Success; +use crate::action::{Action, ACTIONS}; +use crate::craft::Craft; +use crate::specs::Success; macro_rules! action_vec { ($($tt:expr),*) => { vec![ $(Some(&$tt),)*]}; diff --git a/src/utils/specs.rs b/src/specs.rs similarity index 100% rename from src/utils/specs.rs rename to src/specs.rs