Ad
  • Custom User Avatar

    In instructions it's said that "there will always be exactly one king". I coded assuming that was true and was hit by an exception on a (Haskell) random test case that has no king:

     King should not be in check:
      |---|---|---|---|---|---|---|---|
      |   |   |   |   |   |   |   |   |
      |---|---|---|---|---|---|---|---|
      |   | ♟ |   |   |   |   |   |   |
      |---|---|---|---|---|---|---|---|
      |   |   |   |   |   |   |   |   |
      |---|---|---|---|---|---|---|---|
      |   | ♞ |   |   |   |   |   |   |
      |---|---|---|---|---|---|---|---|
      |   |   | ♜ |   |   |   |   |   |
      |---|---|---|---|---|---|---|---|
      |   |   |   |   |   |   |   |   |
      |---|---|---|---|---|---|---|---|
      |   |   |   |   |   |   |   |   |
      |---|---|---|---|---|---|---|---|
      |   |   |   |   | ♝ |   |   |   |
      |---|---|---|---|---|---|---|---|
    

    I assume this is a bug. If it's not, you should clarify in the instructions that "there will always be at most one king".