This module implements binary fields.
Procs
func connect2(self: BinaryField): BinaryField {.inline, ...raises: [], tags: [], forbids: [].}
- Returns the binary field with only the locations where exactly two cells are connected. This function ignores ghost puyos.
func connect2H(self: BinaryField): BinaryField {.inline, ...raises: [], tags: [], forbids: [].}
- Returns the binary field with only the locations where exactly two cells are connected horizontally. This function ignores ghost puyos.
func connect2V(self: BinaryField): BinaryField {.inline, ...raises: [], tags: [], forbids: [].}
- Returns the binary field with only the locations where exactly two cells are connected vertically. This function ignores ghost puyos.
func connect3(self: BinaryField): BinaryField {.inline, ...raises: [], tags: [], forbids: [].}
- Returns the binary field with only the locations where exactly three cells are connected. This function ignores ghost puyos.
func connect3H(self: BinaryField): BinaryField {.inline, ...raises: [], tags: [], forbids: [].}
- Returns the binary field with only the locations where exactly three cells are connected horizontally. This function ignores ghost puyos.
func connect3L(self: BinaryField): BinaryField {.inline, ...raises: [], tags: [], forbids: [].}
- Returns the binary field with only the locations where exactly three cells are connected by L-shape. This function ignores ghost puyos.
func connect3V(self: BinaryField): BinaryField {.inline, ...raises: [], tags: [], forbids: [].}
- Returns the binary field with only the locations where exactly three cells are connected vertically. This function ignores ghost puyos.
func disappeared(self: BinaryField): BinaryField {.inline, ...raises: [], tags: [], forbids: [].}
- Returns the binary field where four or more cells are connected.
func expanded(self: BinaryField): BinaryField {.inline, ...raises: [], tags: [], forbids: [].}
- Dilates the binary field. This function does not trim.
func flipH(self: var BinaryField) {.inline, ...raises: [], tags: [], forbids: [].}
- Flips the binary field horizontally.
func flipV(self: var BinaryField) {.inline, ...raises: [], tags: [], forbids: [].}
- Flips the binary field vertically.
func invalidPositions(self: BinaryField): set[Position] {.inline, ...raises: [], tags: [], forbids: [].}
- Returns the invalid positions. Position.None is not included.
func isDead(self: BinaryField; rule: Rule): bool {.inline, ...raises: [], tags: [], forbids: [].}
- Returns true if the field is in a defeated state.
func shiftDownWithoutTrim(self: var BinaryField; amount: static int32 = 1) {. inline.}
- Shifts the binary field downward.
func shiftedDown(self: BinaryField): BinaryField {.inline, ...raises: [], tags: [], forbids: [].}
- Returns the binary field shifted downward and then trimmed.
func shiftedLeft(self: BinaryField): BinaryField {.inline, ...raises: [], tags: [], forbids: [].}
- Returns the binary field shifted leftward and then trimmed.
func shiftedRight(self: BinaryField): BinaryField {.inline, ...raises: [], tags: [], forbids: [].}
- Returns the binary field shifted rightward and then trimmed.
func shiftedUp(self: BinaryField): BinaryField {.inline, ...raises: [], tags: [], forbids: [].}
- Returns the binary field shifted upward and then trimmed.
func shiftLeftWithoutTrim(self: var BinaryField) {.inline, ...raises: [], tags: [], forbids: [].}
- Shifts the binary field leftward.
func shiftRightWithoutTrim(self: var BinaryField) {.inline, ...raises: [], tags: [], forbids: [].}
- Shifts the binary field rightward.
func shiftUpWithoutTrim(self: var BinaryField; amount: static int32 = 1) {. inline.}
- Shifts the binary field upward.
func validDoublePositions(self: BinaryField): set[Position] {.inline, ...raises: [], tags: [], forbids: [].}
- Returns the valid positions for a double pair. Position.None is not included.
func validPositions(self: BinaryField): set[Position] {.inline, ...raises: [], tags: [], forbids: [].}
- Returns the valid positions. Position.None is not included.
func willDisappear(self: BinaryField): bool {.inline, ...raises: [], tags: [], forbids: [].}
- Returns true if four or more cells are connected.