[][src]Function shakmaty::attacks::ray

pub fn ray(a: Square, b: Square) -> Bitboard

The rank, file or diagonal with the two squares (or an empty Bitboard if they are not aligned).

Example

let ray = attacks::ray(Square::E2, Square::G4);
// . . . . . . . .
// . . . . . . . .
// . . . . . . . .
// . . . . . . . 1
// . . . . . . 1 .
// . . . . . 1 . .
// . . . . 1 . . .
// . . . 1 . . . .