Ad
  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    Hi

    Why is it suited for python 3.10 ? what's the feature of it involved in the refinement of the code ?

    Thanks

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    I am in the same position and I understand that the result must be ?.

    Solution 1: ( "!" are the positions that one can safelly call game.open. "X" upper case is the first guess.
    x 2 3 x 2
    2 ! x x 2
    ! x 3 3 2
    ! ! ! 2 x
    ! ! X 2 1
    In this case we found one possible solution.

    Solution 2:
    x 2 3 x 2
    2 x ! x 2
    ! ! 3 3 2
    ? ! X 2 x
    ? ? ! 2 1
    One mine in any of the ? will also be a solution, so we have 3 more possibilities.

    As we end with 4 possible solutions the return should be "?"

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    The second solution is invalid. Look at the left-bottom coner, if no mines around it, it will be "0", not "?".
    And if your code is clever enough, you can open a and b positions safely:

    1 1 1 1 1
    x 2 3 x 2
    2 ? ? x 2
    a b 3 3 2 
    ? ? ? 2 x 
    ? ? ? 2 1