Skip to content

Conversation

@DeveloperPaul123
Copy link
Owner

Changes

  • Added tracking of threats for history in the form of is_from_attacked and is_to_attacked flags.

See #166

bench: 1176279

Make `get_attacked_squares` public so we can use it for threat
detection.

bench: 1176279
Comment on lines +101 to +105
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]
);
Copy link
Owner Author

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 {
Copy link
Owner Author

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 {
Copy link
Owner Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants