MoveGenerator3D

interface MoveGenerator3D : MoveGenerator<Board3D, MoveGenerator3D, Piece3D, Coordinate3D>

Implementation of the Move Generator interface for a 3D square board.

Types

AddPromotion
Link copied to clipboard
data class AddPromotion(moveGenerators: List<MoveGenerator3D>, region: Region3D, promoPieces: List<Piece3D>, forced: Boolean) : MoveGenerator3D
A piece can be promoted to another piece in a specific region
CaptureOnly
Link copied to clipboard
data class CaptureOnly(moveGenerator: MoveGenerator3D) : MoveGenerator3D
A given move can only occur if it captures a piece
Leaper3D
Link copied to clipboard
data class Leaper3D(dx: Int, dy: Int, dz: Int) : MoveGenerator3D
Performs single steps to specified target squares Takes in a step-vector, which is then mirrored to give a total of up to 8 target coordinates
Slider3D
Link copied to clipboard
class Slider3D(X: Boolean, Y: Boolean, Z: Boolean, D2D: Boolean, AD2D: Boolean, D: Boolean, D3D: Boolean) : MoveGenerator3D
Moves along a ray direction until they encounter another piece or the edge of the board
Stepper3D
Link copied to clipboard
data class Stepper3D(directions: List<Direction3D>, step: Int, canCapture: Boolean) : MoveGenerator3D
Performs single (repeated) steps in a particular board direction

Functions

equals
Link copied to clipboard
open operator fun equals(other: Any?): Boolean
generate
Link copied to clipboard
abstract fun generate(board: Board3D, coordinate: Coordinate3D, piece: Piece3D, player: Player): List<Move<Board3D, MoveGenerator3D, Piece3D, Coordinate3D>>
Takes in the current board, the piece to be moved and its coordinate, and the player who makes the move to return all possible game moves corresponding to the given type of movement.
hashCode
Link copied to clipboard
open fun hashCode(): Int
toString
Link copied to clipboard
open fun toString(): String

Inheritors

MoveGenerator3D
Link copied to clipboard
MoveGenerator3D
Link copied to clipboard
MoveGenerator3D
Link copied to clipboard
MoveGenerator3D
Link copied to clipboard
MoveGenerator3D
Link copied to clipboard