Piece

enum Piece : Enum<Piece>

This class represents the chess pieces on the board. Each piece has a corresponding side (color).

Since

1.0.0-beta.1

Author

lunalobos

Entries

Link copied to clipboard

Represents an empty square on the board.

Link copied to clipboard

White Pawn

Link copied to clipboard

White Knight

Link copied to clipboard

White Bishop

Link copied to clipboard

White Rook

Link copied to clipboard

White Queen

Link copied to clipboard

White King

Link copied to clipboard

Black Pawn

Link copied to clipboard

Black Knight

Link copied to clipboard

Black Bishop

Link copied to clipboard

Black Rook

Link copied to clipboard

Black Queen

Link copied to clipboard

Black King

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Returns a representation of an immutable list of all enum entries, in the order they're declared.

Link copied to clipboard
expect val name: String
Link copied to clipboard
expect val ordinal: Int
Link copied to clipboard
val side: Side?

The side (color) of the piece. This is null for EMPTY.

Functions

Link copied to clipboard
fun valueOf(value: String): Piece

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Link copied to clipboard

Returns an array containing the constants of this enum type, in the order they're declared.