I am trying to implement a Negamax algorithm for tic tac toe but can\'t get it to work. It gives me headache to think about how the tree is progressing and it gives random m