Leaper

data class Leaper(stepVectors: List<Coordinate2D>) : MoveGeneratorHex

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

Constructors

Leaper
Link copied to clipboard
fun Leaper(stepVectors: List<Coordinate2D>)

Functions

component1
Link copied to clipboard
operator fun component1(): List<Coordinate2D>
copy
Link copied to clipboard
fun copy(stepVectors: List<Coordinate2D>): MoveGeneratorHex.Leaper
equals
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
generate
Link copied to clipboard
open override fun generate(board: BoardHex, coordinate: Coordinate2D, piece: PieceHex, player: Player): List<BasicMoveHex>
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 override fun hashCode(): Int
toString
Link copied to clipboard
open override fun toString(): String

Properties

stepVectors
Link copied to clipboard
val stepVectors: List<Coordinate2D>
a list of step-vectors