Skip to content

attackers_to(square, by_color) #56

@Hardcode3

Description

@Hardcode3

🎯 Goal

Efficiently answer:

“Which pieces attack this square?”

🧠 Key Idea

Use reverse attacks from the target square.

🛠️ Tasks

Implement attackers for:

  • pawns (reverse direction)

  • knights

  • king

  • bishops / queens

  • rooks / queens

  • Return a Bitboard of attacking pieces

✅ Acceptance Criteria

  • Unit tests on known positions
  • Used for check detection and castling validation

Metadata

Metadata

Assignees

Labels

featImplementation of a new featuremove-generationChess moves generation (legal, pseudo-legal).testingAdding, updating or removing any kind of tests.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions