Warn of Danger

warnOfDanger.warnOfDanger(originalBoard: Board, log: Callable[[str], None] | None = None, depth: int = 0) Dict[int, int] | None[source]

Warns, if certain pieces are in danger

Basis are the material scores from the attackers point of view, i.e. positive scores show an advantage of the attacker

Parameters:

originalBoard – input board to be analysed

Returns:

a dictionary of square/score pairs