Java Code to implement Reversi to find the next best move