This repository has been archived by the owner on Oct 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: added support for Zobrist hashing
refactor: adjusted how `CastlingRights` work internally
- Loading branch information
1 parent
c810019
commit 3f1ea37
Showing
15 changed files
with
393 additions
and
229 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,4 +6,5 @@ releases/** | |
|
||
# Fastchess | ||
config.json | ||
1 | ||
1 | ||
*.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,26 @@ | ||
use brogle_core::*; | ||
// TODO: Get rid of this file once library is published | ||
|
||
// include!(concat!(env!("OUT_DIR"), "/hello.rs")); | ||
|
||
fn main() { | ||
// for from in Tile::iter() { | ||
// for to in Tile::iter() { | ||
// let ray = ray_between_inclusive(from, to); | ||
// if ray.is_nonempty() { | ||
// println!("{from} -> {to} (inclusive)\n{ray:?}"); | ||
// } | ||
// let fen = "r3k2r/p1ppqpb1/bn2pnp1/3PN3/1p2P3/2N4Q/PPPBBPPP/R3K2R b KQkq - 0 1"; // e8g8 is legal | ||
// let fen = "r3k2r/p1pNqpb1/bn2pnp1/3P4/1p2P3/2N2Q1p/PPPBBPPP/R3K2R b KQkq - 0 1"; // e8c8 is legal | ||
let fen = "r3k2r/p1ppqpb1/bn2pnp1/3PN3/1p2P3/5Q1p/PPPBBPPP/RN2K2R w KQkq - 0 1"; // e1c1 is NOT legal | ||
let game = Game::from_fen(fen).unwrap(); | ||
|
||
// let ray = ray_between_exclusive(from, to); | ||
// if ray.is_nonempty() { | ||
// println!("{from} -> {to} (exclusive)\n{ray:?}"); | ||
// } | ||
for mv in game.legal_moves() { | ||
if mv.from() == Tile::E1 { | ||
println!("{mv}"); | ||
} | ||
} | ||
|
||
// let ray = ray_containing(from, to); | ||
// if ray.is_nonempty() { | ||
// println!("{from} -> {to} (containing)\n{ray:?}"); | ||
// } | ||
// } | ||
// } | ||
/* | ||
let mut game = Game::default(); | ||
game.make_move(Move::from_uci(&game, "b1a3").unwrap()); | ||
println!("pos: {}\nkey: {}", game.position(), game.zobrist_key()); | ||
game.make_move(Move::from_uci(&game, "b8a6").unwrap()); | ||
println!("pos: {}\nkey: {}", game.position(), game.zobrist_key()); | ||
game.make_move(Move::from_uci(&game, "a3b1").unwrap()); | ||
println!("pos: {}\nkey: {}", game.position(), game.zobrist_key()); | ||
game.make_move(Move::from_uci(&game, "a6b8").unwrap()); | ||
println!("pos: {}\nkey: {}", game.position(), game.zobrist_key()); | ||
*/ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.