Skip to content

chessmaker.chess.base.piece

[view_source]

AfterGetMoveOptionsEvent

@dataclass(frozen=True)
class AfterGetMoveOptionsEvent(Event)

[view_source]

piece: "Piece"

[view_source]

move_options: Iterable[MoveOption]

[view_source]

BeforeGetMoveOptionsEvent

class BeforeGetMoveOptionsEvent(AfterGetMoveOptionsEvent)

[view_source]

set_move_options

def set_move_options(move_options: Iterable[MoveOption])

[view_source]

AfterMoveEvent

@dataclass(frozen=True)
class AfterMoveEvent(Event)

[view_source]

piece: "Piece"

[view_source]

move_option: MoveOption

[view_source]

BeforeMoveEvent

class BeforeMoveEvent(AfterMoveEvent,  CancellableEvent)

[view_source]

set_move_option

def set_move_option(move_option: MoveOption)

[view_source]

AfterCapturedEvent

@dataclass(frozen=True)
class AfterCapturedEvent(Event)

[view_source]

captured_piece: "Piece"

[view_source]

BeforeCapturedEvent

class BeforeCapturedEvent(AfterCapturedEvent)

[view_source]

PIECE_EVENT_TYPES

[view_source]

Piece

@event_publisher(*PIECE_EVENT_TYPES)
class Piece(Cloneable,  EventPublisher)

[view_source]

__init__

def __init__(player: Player)

[view_source]

__repr__

def __repr__()

[view_source]

get_move_options

def get_move_options() -> Iterable[MoveOption]

[view_source]

move

def move(move_option: MoveOption)

[view_source]

on_join_board

def on_join_board()

[view_source]

position

@property
def position()

[view_source]

board

@property
def board()

[view_source]

name

@classmethod
@property
@abstractmethod
def name(cls)

[view_source]

clone

@abstractmethod
def clone()

[view_source]