diff --git a/src/cacluate.rs b/src/cacluate.rs index 0f58198..14659c5 100644 --- a/src/cacluate.rs +++ b/src/cacluate.rs @@ -46,8 +46,8 @@ pub struct CacluateConfig { pub thread_count: u32, /// 八围预期值 pub prop_expect: u32, - /// 八围允许范围 - pub prop_allow: u32, + /// qp 预期值 + pub qp_expect: u32, /// 队伍名称 pub team: String, /// 预期状态输出时间间隔 (秒) @@ -109,7 +109,7 @@ pub fn cacl(config: CacluateConfig, id: u64, outfile: &PathBuf) { k = 0; } - if (prop + config.prop_allow as f32) > config.prop_expect as f32 { + if prop > config.prop_expect as f32 { let name = gen_name(i as u64); let full_name = format!("{}@{}", name, config.team); // 虚评 @@ -118,7 +118,7 @@ pub fn cacl(config: CacluateConfig, id: u64, outfile: &PathBuf) { // let xu = crate::evaluate::xuping::XuPing1_3_1::evaluate(&namer); let xu = crate::evaluate::xuping::XuPing2_0_1015::evaluate(&namer); - if xu < 5300.0 { + if xu < config.qp_expect as f64 { continue; } // debug!("Id:{:>15}|{:>5}|{}|{}", i, full_name, xu, show_name(&namer)); diff --git a/src/main.rs b/src/main.rs index feb41b5..efb60b4 100644 --- a/src/main.rs +++ b/src/main.rs @@ -13,9 +13,6 @@ use tracing::{info, warn}; use crate::cacluate::CacluateConfig; -#[allow(non_upper_case_globals)] -const allow_d: u32 = 10; - #[derive(Parser, Debug, Clone)] pub struct Command { /// 开始的 id @@ -28,8 +25,11 @@ pub struct Command { #[arg(long, short = 't', default_value_t = 10)] pub thread_count: u32, /// 八围预期值 - #[arg(long = "prop-expected", short = 'p', default_value_t = 740)] + #[arg(long = "prop-expected", short = 'p', default_value_t = 640)] pub prop_expect: u32, + /// qp 预期值 + #[arg(long = "qp-expected", short = 'q', default_value_t = 0)] + pub qp_expect: u32, /// 队伍名称 #[arg(long)] pub team: String, @@ -45,7 +45,7 @@ impl Command { end: self.end, thread_count: self.thread_count, prop_expect: self.prop_expect, - prop_allow: allow_d, + qp_expect: self.qp_expect, team: self.team.clone(), report_interval: self.report_interval, }