List<M> asMoveList(){
        List<M> solution = new LinkedList<M>();
        for (Node<P, M> n = this; n.move!=null; n=n.prev)
        {
            solution.add(0,n.move);
        }
        return solution;
    }