-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
move-generationChess moves generation (legal, pseudo-legal).Chess moves generation (legal, pseudo-legal).refactoringRefactoring pieces of code of any kind.Refactoring pieces of code of any kind.
Description
🎯 Goal
Extract a pure attack layer, fully independent from legality, colors, kings, or move objects.
🧠 Key Idea
An *_attacks() function:
- returns a Bitboard
- depends only on (Square from, Bitboard occupied)
- never creates a Move
🛠️ Tasks
Implement sliders (occupancy dependent attacks):
- bishop_attacks(from, occupied)
- rook_attacks(from, occupied)
- queen_attacks = bishop | rook
Implement non sliders (occupancy independent attacks):
-
knight_attacks[from]
-
king_attacks[from]
-
pawn_attacks(color, from)
-
Rename ambiguous functions (generate_* -> *_attacks)
-
Ensure no board or color logic leaks into this layer
✅ Acceptance Criteria
- Attacks match the old pseudo-legal generators
- No legality filtering
- No move creation
Metadata
Metadata
Assignees
Labels
move-generationChess moves generation (legal, pseudo-legal).Chess moves generation (legal, pseudo-legal).refactoringRefactoring pieces of code of any kind.Refactoring pieces of code of any kind.