Skip to content

chessmaker.chess.base.square

[view_source]

AfterAddPieceEvent

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

[view_source]

square: "Square"

[view_source]

piece: "Piece"

[view_source]

BeforeAddPieceEvent

class BeforeAddPieceEvent(AfterAddPieceEvent)

[view_source]

set_piece

def set_piece(piece: "Piece")

[view_source]

BeforeRemovePieceEvent

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

[view_source]

square: "Square"

[view_source]

piece: "Piece"

[view_source]

AfterRemovePieceEvent

class AfterRemovePieceEvent(BeforeRemovePieceEvent)

[view_source]

SQUARE_EVENT_TYPES

[view_source]

Square

@event_publisher(*SQUARE_EVENT_TYPES)
class Square(Cloneable,  EventPublisher)

[view_source]

__init__

def __init__(piece: Optional["Piece"] = None)

[view_source]

piece

@property
def piece() -> "Piece"

[view_source]

position

@property
def position()

[view_source]

board

@property
def board()

[view_source]

piece

@piece.setter
def piece(piece: "Piece")

[view_source]

clone

def clone()

[view_source]