Ad
  • Default User Avatar

    would it not also be a cat's game(no win con) before all tiles has been filled?
    eg: [[1, 2, 2], [2, 1, 1], [0, 0, 2]]

  • Custom User Avatar

    In PHP, the Node class is more or less:

    final class Node {
      // ... some irrelevant fields
      public function getNext(): Node {
        return some_node_following_the_current_one;
      }
      
      // ... some irrelevant implementation details
    }
    

    All what is needed to oslve the kata is to know that class is named Node and that it has the method Node nextNode(). I will see how to make this clearer.

  • Default User Avatar

    it is not provided by the Kata for PHP. no idea what Node is

  • Custom User Avatar

    just implement your own linked list

  • Custom User Avatar

    Anyway, in every language, the method to fetch a next node is provided by the kata itself. It's not provided by any library, it comes from the code of the kata.
    Having said that, it should not be really relevant how getNext looks inside. Everything what's important is that the only operation avaialble on nodes is "get next node", and it's sufficient to solve the problem.

  • Custom User Avatar

    In what language?

  • Default User Avatar

    I have a general question, does anyone know where the function getNext() is from and if it is possible to see the code for it or see if there are more functions available from that library?