Skip to content

Check if move sets own king in check #3

@KristopherJordan

Description

@KristopherJordan

It is not allowed to make a move where you own King is set in check

Thought about iterating over all pieces for the other colour and check if it is a valid move to take the king if the piece has moved. If the move is valid, then the initial move is not valid. Should raise an exception.

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