Skip to content
This repository has been archived by the owner on Jan 22, 2024. It is now read-only.

Commit

Permalink
fix forced analysis lines
Browse files Browse the repository at this point in the history
  • Loading branch information
MinusKelvin committed Mar 22, 2020
1 parent 266c7af commit 86853af
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions bot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,7 @@ impl Interface {
}
}

/// Specifies a line that Cold Clear should analyze before making any moves. The path is
/// sensitive to T-spin status.
/// Specifies a line that Cold Clear should analyze before making any moves.
pub fn force_analysis_line(&mut self, path: Vec<FallingPiece>) {
if self.send.send(BotMsg::ForceAnalysisLine(path)).is_err() {
self.dead = true;
Expand Down Expand Up @@ -253,7 +252,7 @@ impl<E: Evaluator> BotState<E> {
}

pub fn next_move(&mut self, incoming: u32, f: impl FnOnce(Move, Info)) -> bool {
if self.tree.nodes < self.options.min_nodes {
if !self.min_thinking_reached() {
return false
}

Expand Down
2 changes: 1 addition & 1 deletion bot/src/tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ impl<E: Evaluation<R>, R: Clone> TreeState<E, R> {
let range = start as usize..(start + len) as usize;
if let [next, rest @ ..] = path {
for c in &self.childs[range.clone()] {
if c.mv == *next {
if c.mv.cells() == next.cells() {
current = c.node;
path = rest;
continue 'descend;
Expand Down

0 comments on commit 86853af

Please sign in to comment.