generate
open override fun generate(board: Board2D, coordinate: Coordinate2D, piece: Piece2D, player: Player): List<BasicMove2D>
Content copied to clipboard
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.
Return
a list of corresponding game moves.
Parameters
board
the current board
coordinate
the coordinate of the piece to be moved
piece
the piece to be moved
player
the player who makes the move