Finding the winner in Tic-Tac-Toe (Java using 2-D arrays)
问题 I'm having trouble figuring out how to display the winner of the game in this tic-tac-toe program. import java.util.*; public class tic { public static void main(String[] args) { Scanner in = new Scanner(System.in); boolean flag=false; char[][] board = { {' ', ' ', ' '}, {' ', ' ', ' '}, {' ', ' ', ' '} }; boolean done = false; int player = 1; int row = 0; int col = 0; while (flag != true) { checkForWinner(board); System.out.println("Enter the row and column for your next move"); row = in