From 57af0c3f27da77ae39caa4f580f003290b0727e0 Mon Sep 17 00:00:00 2001 From: stefiosif Date: Fri, 5 Jul 2024 20:33:46 +0300 Subject: [PATCH] Add release tag on github workflow --- .github/workflows/rust.yml | 4 ++-- src/perft.rs | 22 ---------------------- 2 files changed, 2 insertions(+), 24 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 000bb2c..815e6f6 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -17,6 +17,6 @@ jobs: steps: - uses: actions/checkout@v4 - name: Build - run: cargo build --verbose + run: cargo build --verbose --release - name: Run tests - run: cargo test --verbose + run: cargo test --verbose --release diff --git a/src/perft.rs b/src/perft.rs index 527ade8..1ceb9e0 100644 --- a/src/perft.rs +++ b/src/perft.rs @@ -15,31 +15,9 @@ pub fn driver(game: &mut Game, nodes: &mut u64, depth: u8) { continue; } - print_perftree(mv.source, mv.target, depth, nodes); - driver(game, nodes, depth - 1); game.board = original_board; } - - #[allow(dead_code)] - fn print_perftree(source: u32, target: u32, depth: u8, nodes: &mut u64) { - // println!( - // "{}{} - depth: {} - nodes: {}", - // square_to_notation(source as u8), - // square_to_notation(target as u8), - // depth, - // nodes - // ); - - if depth == MAX_DEPTH { - println!( - "{}{} {}", - square_to_notation(source as u8), - square_to_notation(target as u8), - nodes - ); - } - } } const MAX_DEPTH: u8 = 3;