Attributes
Members list
Type members
Inherited and Abstract types
The names of the product elements
The names of the product elements
Attributes
- Inherited from:
- Mirror
The name of the type
The name of the type
Attributes
- Inherited from:
- Mirror
Value members
Concrete methods
Bitmask for all cells in the given column.
Bitmask for all cells in the given column.
Value parameters
- col
-
the column index (0..6).
Attributes
- Returns
-
a
Longwith bits set for all rows in that column.
Parse a Connect4 position from a string representation. The string is read top-to-bottom, left-to-right. 'X' = X, '0' or 'O' = O, '.' or ' ' = empty. Newlines and '-' are stripped. Must contain exactly rows*cols meaningful characters.
Parse a Connect4 position from a string representation. The string is read top-to-bottom, left-to-right. 'X' = X, '0' or 'O' = O, '.' or ' ' = empty. Newlines and '-' are stripped. Must contain exactly rows*cols meaningful characters.
Value parameters
- s
-
the string to parse.
Attributes
- Returns
-
a Connect4 position.
Concrete fields
Bitmask covering all valid (non-sentinel) cell positions. Must be defined after columnMask.
Bitmask covering all valid (non-sentinel) cell positions. Must be defined after columnMask.
Attributes
Number of columns.
Number of columns.
Attributes
Number of rows.
Number of rows.
Attributes
Column stride in the bitboard: rows + 1 sentinel bit per column. The sentinel bit at position col*stride + rows is never set during play, preventing horizontal win detection from wrapping across columns.
Column stride in the bitboard: rows + 1 sentinel bit per column. The sentinel bit at position col*stride + rows is never set during play, preventing horizontal win detection from wrapping across columns.
Attributes
Shift amounts for win detection in each of the four directions: stride = horizontal (one column apart) 1 = vertical (one row apart) stride - 1 = diagonal / stride + 1 = diagonal \
Shift amounts for win detection in each of the four directions: stride = horizontal (one column apart) 1 = vertical (one row apart) stride - 1 = diagonal / stride + 1 = diagonal \