-
Notifications
You must be signed in to change notification settings - Fork 0
feat: add initial implementation of history threats #176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Make `get_attacked_squares` public so we can use it for threat detection. bench: 1176279
bench: 1176279
| let grid = self.table[side as usize][piece_type][square]; | ||
| print!( | ||
| "{:5} | {:5}\n------\n[{:5} | {:5} ]", | ||
| grid[0][0], grid[0][1], grid[1][0], grid[1][1] | ||
| ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haven't actually tested this to see what it looks like - might have broken things.
| let history_table = HistoryTable::new(); | ||
| // loop through all sides, piece types, and squares | ||
| for side in 0..2 { | ||
| for side in 0..2u8 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use the actual enum type here Side
| // loop through all sides, piece types, and squares | ||
| for side in 0..2 { | ||
| for side in 0..2u8 { | ||
| for piece_type in 0..6 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here, use Piece directly
Use move gens `is_square_attacked` function instead. bench: 1176279
ba16707 to
745c184
Compare
600caf2 to
21b4ab7
Compare
Changes
is_from_attackedandis_to_attackedflags.See #166
bench: 1176279