Chess: the chess piece
The Chess Piece
Part of the How to Program a Chess Engine in Lisp series.
Donald Knuth is credited with the statement:
...We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil. Yet we should not pass up our opportunities in that critical 3%.
Chess programming is most assuredly in the 3%! Our challenge in this series will be to strike a reasonable balance between efficiency and clarity. Our first opportunity to that end is the chess piece.
Here is the source for piece.rkt