Add release tag on github workflow
This commit is contained in:
4
.github/workflows/rust.yml
vendored
4
.github/workflows/rust.yml
vendored
@@ -17,6 +17,6 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Build
|
- name: Build
|
||||||
run: cargo build --verbose
|
run: cargo build --verbose --release
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: cargo test --verbose
|
run: cargo test --verbose --release
|
||||||
|
|||||||
22
src/perft.rs
22
src/perft.rs
@@ -15,31 +15,9 @@ pub fn driver(game: &mut Game, nodes: &mut u64, depth: u8) {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
print_perftree(mv.source, mv.target, depth, nodes);
|
|
||||||
|
|
||||||
driver(game, nodes, depth - 1);
|
driver(game, nodes, depth - 1);
|
||||||
game.board = original_board;
|
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;
|
const MAX_DEPTH: u8 = 3;
|
||||||
|
|||||||
Reference in New Issue
Block a user