Retire the misdesigned StepAttacks[] array.
authorMarco Costalba <mcostalba@gmail.com>
Sat, 29 Apr 2017 03:33:30 +0000 (20:33 -0700)
committerJoona Kiiski <joona@zoox.com>
Sat, 29 Apr 2017 03:33:30 +0000 (20:33 -0700)
commite06a117d5e78ec4edc051f2b161d36559f784d37
treed0ae6437f326ca496416420a33bf787cc0ccaa33
parentb1b19343cd1f5ec65084dc11a0a0b4d5ece2a24b
Retire the misdesigned StepAttacks[] array.

StepAttacks[] is misdesigned, the color dependance is specific
to pawns, and trying to generalise to king and knights, proves
neither useful nor convinient in practice.

So this patch reformats the code with the following changes:

- Use PieceType instead of Piece in attacks_() functions

- Use PseudoAttacks for KING and KNIGHT

- Rename StepAttacks[] into PawnAttacks[]

Original patch and idea from Alain Savard.

No functional change.

Closes #1086
src/bitbase.cpp
src/bitboard.cpp
src/bitboard.h
src/movegen.cpp
src/pawns.cpp
src/position.cpp
src/position.h
src/syzygy/tbprobe.cpp