having two methods for checking if the king is in check is confusing. The user of the calculator must know which version of the pieces are used, which is not good design.
Change to let the calculator decide instead, by passing a parameter on creation.
having two methods for checking if the king is in check is confusing. The user of the calculator must know which version of the pieces are used, which is not good design.
Change to let the calculator decide instead, by passing a parameter on creation.