Changes

Jump to: navigation, search

Subtracting a Rook from a Blocking Piece

12 bytes added, 11:14, 25 June 2018
no edit summary
'''[[Main Page|Home]] * [[Board Representation]] * [[Bitboards]] * [[Sliding Piece Attacks]] * Subtracting a Rook from a Blocking Piece'''
[[FILE:BishopKnightRook.jpg|border|right|thumb|link=http://chgs.elevator.umn.edu/asset/viewAsset/57f3b6787d58ae5f74bf8ba9#57f3b6d77d58ae5574bf8bb6|[[Arts#:Category:Samuel Bak|Samuel Bak]] - Bishop, Knight, Rook <ref>[http://chgs.elevator.umn.edu/asset/viewAsset/57f3b6787d58ae5f74bf8ba9#57f3b6d77d58ae5574bf8bb6 Chess in the Art of Samuel Bak], [http://www.chgs.umn.edu/ Center for Holocaust & Genocide Studies], [https://en.wikipedia.org/wiki/University_of_Minnesota University of Minnesota]</ref> ]]
If we think about an [[General Setwise Operations#ArithmeticalOperations|arithmetical operation]] to calculate rank-attacks of a [[Rook|rook]] or [[Queen|queen]] with bitboards, [[General Setwise Operations#Subtraction|subtraction]] comes in mind. The idea is to treat the arithmetical carry, or inverse, borrow propagation as a way to generate rook attacks in one ray direction. As long there are zeros left (empty squares) between blocker and subtracting rook, the borrow walks through, similar as a [[Sliding Pieces|sliding piece]] moves along the empty squares.

Navigation menu