Changes

Jump to: navigation, search

Subtracting a Rook from a Blocking Piece

26 bytes added, 08:46, 11 May 2018
m
no edit summary
</pre>
... yielding exactly the attack set of the rook(s) in positive rank direction, from left to right (from whites point of view) or A- to H-file.
<span id="oxoro2r"></span>
=o^(o-2r)=
This trick is known as '''o^(o-2r)'''. [[Occupancy]] '''o''' may include the rook '''r''' or not, the subtraction or 2r does not affect this bit, and no matter whether it is set or not, the [[General Setwise Operations#ExclusiveOr|xor operation]] only yields the changed bits as sliding attacks. Unfortunately it only works on [[On an empty Board#PositiveRays|positive rays]], but can be applied for [[Files|files]] or [[Diagonals|diagonals]] with leading and trailing [[General Setwise Operations#Intersection|intersections]] with the [[On an empty Board#LineAttacks|line-masks]]. For instance, north attacks of a rook on d2:

Navigation menu