Bitboard

dicechess.engine.domain.Models$package.Bitboard
object Bitboard

A 64-bit integer representing a set of squares on the chess board.

Uses Little-Endian Rank-File (LERF) mapping, where bit 0 is a1 and bit 63 is h8.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Bitboard.type

Members list

Value members

Concrete methods

inline def apply(value: Long): Bitboard

Creates a bitboard from a raw 64-bit integer.

Creates a bitboard from a raw 64-bit integer.

Attributes

Creates a bitboard with a single square occupied.

Creates a bitboard with a single square occupied.

Attributes

Concrete fields

An empty bitboard (no squares occupied).

An empty bitboard (no squares occupied).

Attributes

val full: Bitboard

A full bitboard (all squares occupied).

A full bitboard (all squares occupied).

Attributes

Extensions

Extensions

extension (bb: Bitboard)
infix inline def &(other: Bitboard): Bitboard

Bitwise AND (Intersection)

Bitwise AND (Intersection)

Attributes

infix inline def <<(n: Int): Bitboard

Bitwise Left Shift

Bitwise Left Shift

Attributes

infix inline def >>>(n: Int): Bitboard

Logical Right Shift (Zero Fill)

Logical Right Shift (Zero Fill)

Attributes

infix inline def ^(other: Bitboard): Bitboard

Bitwise XOR (Symmetric Difference)

Bitwise XOR (Symmetric Difference)

Attributes

inline def add(sq: Square): Bitboard

Adds a square to the bitboard.

Adds a square to the bitboard.

Attributes

inline def contains(sq: Square): Boolean

Checks if a square is occupied on this bitboard.

Checks if a square is occupied on this bitboard.

Attributes

inline def count: Int

Returns the number of occupied squares (using JVM POPCNT intrinsic).

Returns the number of occupied squares (using JVM POPCNT intrinsic).

Attributes

inline def isEmpty: Boolean

Returns true if the bitboard has no occupied squares.

Returns true if the bitboard has no occupied squares.

Attributes

inline def remove(sq: Square): Bitboard

Removes a square from the bitboard.

Removes a square from the bitboard.

Attributes

inline def unary_~: Bitboard

Bitwise NOT (Complement)

Bitwise NOT (Complement)

Attributes

inline def value: Long

Exposes the underlying Long value.

Exposes the underlying Long value.

Attributes

infix inline def |(other: Bitboard): Bitboard

Bitwise OR (Union)

Bitwise OR (Union)

Attributes