Java Code implementing alpha beta pruning and minimax algorithms to find the next best move