diff --git a/crates/odonata-base/src/eg/endgame.rs b/crates/odonata-base/src/eg/endgame.rs index 0b9cab0..5502e8c 100644 --- a/crates/odonata-base/src/eg/endgame.rs +++ b/crates/odonata-base/src/eg/endgame.rs @@ -1,6 +1,5 @@ use serde::{Deserialize, Serialize}; -use strum::IntoEnumIterator; -use strum_macros::{Display, EnumCount, EnumIter, IntoStaticStr}; +use strum_macros::{Display, EnumCount, IntoStaticStr}; use crate::prelude::*; use crate::trace::stat::{SliceStat, Stat}; @@ -55,7 +54,7 @@ impl Configurable for EndGameScoring { } } -#[derive(Copy, Default, Clone, PartialEq, Debug, IntoStaticStr, EnumCount, EnumIter, Display)] +#[derive(Copy, Default, Clone, PartialEq, Debug, IntoStaticStr, EnumCount, Display)] pub enum EndGame { #[default] Unknown, // for when its too costly to work out who wins @@ -139,11 +138,11 @@ pub enum EndGame { use static_init::dynamic; #[dynamic] static ENDGAME_COUNTS: Vec = { - let mut vec = vec![]; - for eg in EndGame::iter() { - let s: &'static str = eg.into(); - vec.push(Stat::new(s)); - } + let vec = vec![]; + // for eg in EndGame::iter() { + // let s: &'static str = eg.into(); + // vec.push(Stat::new(s)); + // } vec }; @@ -417,7 +416,7 @@ impl EndGame { pub fn from_board(b: &Board) -> Self { let eg = Self::private_ctor(b); - ENDGAME_COUNTS[eg as usize].increment(); + // ENDGAME_COUNTS[eg as usize].increment(); eg } diff --git a/crates/odonata-base/src/infra/metric.rs b/crates/odonata-base/src/infra/metric.rs index 79b1adf..b9b1ba3 100644 --- a/crates/odonata-base/src/infra/metric.rs +++ b/crates/odonata-base/src/infra/metric.rs @@ -1064,9 +1064,9 @@ impl fmt::Display for Metrics { // let mut b = Builder::default(); b.set_header(["Counter", "Value"]); - for eg in EndGame::iter() { - b.push_record([&eg.to_string(), &i(self.endgame[eg as usize])]); - } + // for eg in EndGame::iter() { + // b.push_record([&eg.to_string(), &i(self.endgame[eg as usize])]); + // } let mut t = b.build(); t.with(style.clone()) .with(Modify::new(Rows::single(0)).with(Border::default().top('-'))) diff --git a/docs/README.md b/docs/README.md index 543fcf4..1c79cd7 100644 --- a/docs/README.md +++ b/docs/README.md @@ -4,7 +4,7 @@ # Odonata A chess engine written in Rust. -Odonata is designed by [Andy Watkins](https://github.com/akanalytics), with [Mark Raistrick](https://github.com/raistrma) assisting with designs and discussion. Bugs in the Rust code will certainly be mine though - Andy ;-) +Odonata was created by [Andy Watkins](https://github.com/akanalytics), with [Mark Raistrick](https://github.com/raistrma) assisting with designs and discussion. Bugs in the Rust code will certainly be mine though - Andy ;-) My lockdown hobby was writing a chess engine, and learning Python and Rust in the process. I started Decemeber 2020. Python and Rust are very different from Java, which I had programmed maybe 10 years previous. Certainly my first efforts at Rust are not very clean, clever or idiomatic, but the code improves as I revisit areas to build improvements.