Ad
  • Default User Avatar

    On C# I pass all the fixed tests, but when I press 'attempt' I the random test is passed while the fixed test fails because of exception "Sequence contains no elements"

  • Default User Avatar

    I passed all the base tests and 30-50 random tests, but then all the tests fail.
    For example:
    Random test 1 is passed;

    Random test 2:

    Expected: "Player 1 is on square 8"
    But was: "Player 1 is on square 97"

    Expected: "Player 2 is on square 4"
    But was: "Player 2 is on square 80"

    I tried many ways and reviewed the code thoroughly, but the situation remains the same. May be you have assumptions what goes wrong?

    UPD: I trained on C#

    UPD 2: Should the positions be reset after returning "Game over!"? However, I have already tried this too...

    UPD 3: I implemented steps of each player as static int variables and in a default constructor I reset them to 0, but it has no effect.
    When each new random test with 50 rolls starts a new instance of the class is created, isn't it? So when it is created both step variables would be 0 anyway...