Fixed minimax function (i.e. the generateNewBoardWithDepth), need more testing