Ad
  • Custom User Avatar

    awaiting feedback

  • Custom User Avatar

    The code literally says returns index of move

  • Custom User Avatar

    The number of random tests in JS is extremely low only 10.
    The quality of the tests is also suboptimal; invalid cases are generated that do not adhere to the rules of Tic-Tac-Toe, and the fixed test cases also include several invalid board configurations. example: ['', 'O', 'O', 'O', 'O', '', 'X', 'X', '']

       | O | O 
    ---+---+---
     O | O |  
    ---+---+---
     X | X |   
    
  • Custom User Avatar

    now on dart Translation Dart

    The author has been inactive for a long time; community help is needed.

    I am working on a Python port and need quick feedback.

  • Custom User Avatar

    I am working on translating this kata. Is this test case valid? board: ['', 'O', 'O', 'O', 'O', '', 'X', 'X', '']
    After all, according to the rules of Tic-Tac-Toe, X and O take turns, and the count of one symbol cannot be double that of the other.

  • Custom User Avatar

    Just put [0]s in front of the returns. Worked like a charm.

    Please specify to return one valid move instead of a list of them.

  • Custom User Avatar

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

  • Custom User Avatar

    JS

    Test.expect should be scrutinized to mocha + chai framework

  • Custom User Avatar
    • Description should be language-agnostic

    • Should also mention that we need to return a valid move, and a winning move if possible (with concrete examples) Currently the setup can easily mislead solvers to return a list of available moves if no winning move is possible

  • Custom User Avatar

    Description must contain a rule about a boards where any move will be fail.
    Wasted so many attempts to know that function must return any free point (not -1, null, false or undefined).

  • Custom User Avatar

    I must return index of the move right 0-8 || -1? Then why it shows some kind of error...

  • Custom User Avatar

    Can someone explain how it works?

  • Custom User Avatar

    I also assumed we had to make the "best" move possible. The description isn't all that clear about what is required.

  • Custom User Avatar

    fun kata. I just don't understand why it is 6kyu and the other - simple result-checker kata - is 5 kyu. I think this kata looks a step further. It is fine for a 6kyu just I find the other one simpler. nvm

  • Custom User Avatar

    Hi!

    Written tests allows to push partial kata solution

    just look at my terrible solutions, wich passed the tests.

    suggest add this case:

    b = ['O', 'X', 'X', '', '', 'X', 'X', 'O', 'O'];
    Test.expect(solveTTT(b.slice()) == 4, "Error with board: " + b + " - Got: " + solveTTT(b.slice()));
    
  • Loading more items...