Skip to content

Baseboard/Board: add method to count total number of pieces #1140

Open
@kraktus

Description

@kraktus

Unless I've missed it, not possible to and useful when working with tbs for example.
My goto implementation for now is

len(chess.SquareSet(board.occupied))

not sure about the name, baseboard.nb_pieces, baseboard.total_nb_pieces, baseboard.pieces_count (but could be thought as the count of pieces per type).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions