Chess Pawn Hex
abstract class ChessPawnHex(player: Player, direction: DirectionHex, startingRegion: Region2D, promotionRegion: Region2D, pawnPromotions: List<PieceHex>) : Pawn, PieceHex
Content copied to clipboard
Represents a pawn in standard chess
Parameters
player
the player who owns the pawn
direction
the direction that the pawn is facing (determines the direction that pawn moves to)
startingRegion
the region that the pawn starts from (used for double step move)
promotionRegion
the region that the promotion can occur
pawnPromotions
the pieces that the pawn can be promoted to
Constructors
ChessPawnHex
Link copied to clipboard
fun ChessPawnHex(player: Player, direction: DirectionHex, startingRegion: Region2D, promotionRegion: Region2D, pawnPromotions: List<PieceHex> = listOf(HexQueen(player), HexBishop(player), HexKnight(player), HexRook(player)))
Content copied to clipboard
the player who owns the pawn