From cfbc28e0bed488dd70eaabb7161765089d9dcba8 Mon Sep 17 00:00:00 2001 From: Max Fierro Date: Thu, 7 Mar 2024 00:27:08 -0800 Subject: [PATCH] Minor fixes --- src/database/object/record.rs | 3 ++- src/database/util.rs | 2 +- src/game/zero_by/mod.rs | 6 +++--- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/database/object/record.rs b/src/database/object/record.rs index 61a56c1..460e015 100644 --- a/src/database/object/record.rs +++ b/src/database/object/record.rs @@ -1,6 +1,7 @@ //! # Database Record Module //! -//! This module provides an interface for statically-allocated database records. +//! This module defines the interface of a database record, and provides some +//! handy implementations for them. //! //! #### Authorship //! diff --git a/src/database/util.rs b/src/database/util.rs index 4f8f71b..c853254 100644 --- a/src/database/util.rs +++ b/src/database/util.rs @@ -45,7 +45,7 @@ fn check_datatype_validity<'a>( ) -> Result<(), DatabaseError<'a>> { let s = new.size(); if match new.datatype() { - Datatype::CSTR => s % 4 != 0, + Datatype::CSTR => s % 8 != 0, Datatype::DPFP => s != 64, Datatype::SPFP => s != 32, Datatype::SINT => s < 2, diff --git a/src/game/zero_by/mod.rs b/src/game/zero_by/mod.rs index 34731a0..f4f4fd9 100644 --- a/src/game/zero_by/mod.rs +++ b/src/game/zero_by/mod.rs @@ -26,7 +26,7 @@ use crate::interface::{IOMode, SolutionMode}; use crate::model::PlayerCount; use crate::model::Utility; use crate::model::{State, Turn}; -use crate::solver::strong::acyclic; +use crate::solver::strong; /* SUBMODULES */ @@ -94,11 +94,11 @@ impl Game for Session { fn solve(&self, mode: IOMode, method: SolutionMode) -> Result<()> { match (self.players, method) { (2, SolutionMode::Strong) => { - acyclic::dynamic_solver::<2, Self>(self, mode) + strong::acyclic::dynamic_solver::<2, Self>(self, mode) .context("Failed solver run.")? }, (10, SolutionMode::Strong) => { - acyclic::dynamic_solver::<10, Self>(self, mode) + strong::acyclic::dynamic_solver::<10, Self>(self, mode) .context("Failed solver run.")? }, _ => {