RestrictedDestination

data class RestrictedDestination(moveGenerator: MoveGenerator2D, region: Region2D) : MoveGenerator2D

A given move can only occur if the destination is within a specific region

Constructors

RestrictedDestination
Link copied to clipboard
fun RestrictedDestination(moveGenerator: MoveGenerator2D, region: Region2D)

Functions

component1
Link copied to clipboard
operator fun component1(): MoveGenerator2D
component2
Link copied to clipboard
operator fun component2(): Region2D
copy
Link copied to clipboard
fun copy(moveGenerator: MoveGenerator2D, region: Region2D): MoveGenerator2D.RestrictedDestination
equals
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
generate
Link copied to clipboard
open override fun generate(board: Board2D, coordinate: Coordinate2D, piece: Piece2D, player: Player): List<BasicMove2D>
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

moveGenerator
Link copied to clipboard
val moveGenerator: MoveGenerator2D
region
Link copied to clipboard
val region: Region2D
the region that the piece can end in