Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

queen-attack test that prevents incorrectly accepted answers due to unsigned type. #1012

Closed
wants to merge 1 commit into from

Commits on Sep 10, 2024

  1. This test invalidate wrongly correct answers that didn't consider Uns…

    …igned types and its overflow. E.g. abs(queen_1.row - queen_2.row) == abs(queen_1.column - queen_2.column)
    
    Tests if Queens can attack each other even when they crossed sides of the board, which is a common position on chest.
    Also it ensure that the students start to take into account overflows that happens often in C/C++
    edu-bm7 committed Sep 10, 2024
    Configuration menu
    Copy the full SHA
    560e4ca View commit details
    Browse the repository at this point in the history