My Project
osl::container::BoardMask Class Reference

11 x 12 More...

#include <boardMask.h>

Public Member Functions

 BoardMask ()
 BoardMask (const BoardMask &src)
BoardMaskoperator= (const BoardMask &src)
void clear ()
void invalidate ()
bool isInvalid () const
void set (unsigned int i)
void set (Square pos)
void reset (unsigned int i)
void reset (Square pos)
bool test (unsigned int i) const
bool test (Square pos) const
bool anyInRange (const BoardMask &mask) const
BoardMaskoperator|= (const BoardMask &mask)
bool any () const
Square takeOneBit ()

Static Public Member Functions

static int index (int x, int y)
static int index (Square pos)
template<Direction Dir, Player P>
static int getIndexOffset ()
static Square toSquare (int n)

Private Attributes

CArray< unsigned long long, 3 > contents
 the third one is only for edge

Friends

bool operator== (const BoardMask &l, const BoardMask &r)

Detailed Description

11 x 12

Definition at line 20 of file boardMask.h.

Constructor & Destructor Documentation

◆ BoardMask() [1/2]

Definition at line 25 of file boardMask.h.

References invalidate().

Referenced by anyInRange(), BoardMask(), operator=(), operator==, and operator|=().

◆ BoardMask() [2/2]

osl::container::BoardMask::BoardMask ( const BoardMask & src)
inline

Definition at line 26 of file boardMask.h.

References BoardMask(), and contents.

Member Function Documentation

◆ any()

bool osl::container::BoardMask::any ( ) const
inline

Definition at line 68 of file boardMask.h.

References contents, and isInvalid().

Referenced by osl::eval::ml::KnightFork::accumulate(), and takeOneBit().

◆ anyInRange()

◆ clear()

Definition at line 37 of file boardMask.h.

References contents.

Referenced by osl::eval::ml::KnightFork::evalOne().

◆ getIndexOffset()

template<Direction Dir, Player P>
int osl::container::BoardMask::getIndexOffset ( )
inlinestatic

Definition at line 86 of file boardMask.h.

References osl::BLACK.

◆ index() [1/2]

int osl::container::BoardMask::index ( int x,
int y )
inlinestatic

Definition at line 80 of file boardMask.h.

Referenced by reset(), set(), and test().

◆ index() [2/2]

int osl::container::BoardMask::index ( Square pos)
inlinestatic

Definition at line 81 of file boardMask.h.

References osl::Square::index().

◆ invalidate()

Definition at line 38 of file boardMask.h.

References contents.

Referenced by BoardMask().

◆ isInvalid()

bool osl::container::BoardMask::isInvalid ( ) const
inline

Definition at line 39 of file boardMask.h.

References contents.

Referenced by any(), takeOneBit(), and osl::eval::ml::KnightFork::updateSquares().

◆ operator=()

BoardMask & osl::container::BoardMask::operator= ( const BoardMask & src)
inline

Definition at line 30 of file boardMask.h.

References BoardMask(), and contents.

◆ operator|=()

BoardMask & osl::container::BoardMask::operator|= ( const BoardMask & mask)
inline

Definition at line 62 of file boardMask.h.

References BoardMask(), and contents.

◆ reset() [1/2]

Definition at line 51 of file boardMask.h.

References index(), and reset().

Referenced by reset().

◆ reset() [2/2]

void osl::container::BoardMask::reset ( unsigned int i)
inline

Definition at line 47 of file boardMask.h.

References contents.

Referenced by osl::eval::ml::KnightFork::updateSquares().

◆ set() [1/2]

Definition at line 44 of file boardMask.h.

References index(), and set().

◆ set() [2/2]

◆ takeOneBit()

◆ test() [1/2]

bool osl::container::BoardMask::test ( Square pos) const
inline

Definition at line 56 of file boardMask.h.

References index(), and test().

Referenced by test().

◆ test() [2/2]

◆ toSquare()

Definition at line 93 of file boardMask.h.

References osl::Square::makeDirect().

Referenced by takeOneBit().

◆ operator==

bool operator== ( const BoardMask & l,
const BoardMask & r )
friend

Definition at line 102 of file boardMask.h.

References BoardMask(), and contents.

Member Data Documentation

◆ contents

CArray<unsigned long long,3> osl::container::BoardMask::contents
private

the third one is only for edge

Definition at line 23 of file boardMask.h.

Referenced by any(), anyInRange(), BoardMask(), clear(), invalidate(), isInvalid(), operator=(), operator==, operator|=(), reset(), set(), takeOneBit(), and test().


The documentation for this class was generated from the following file: