isHori, isVerti, isDiag에 count 출력하는 코드 넣고
isDiag 맨 마지막에 is, isis, is&&isis 출력하는 코드 넣고
int[][] board1={
{0,0,0,0,0,0,0},
{0,0,0,0,0,0,0},
{0,0,0,0,0,0,0},
{0,0,0,0,0,0,0},
{0,0,0,0,0,0,0},
{0,0,0,1,1,1,1}
};
int[][] board2={
{0,0,0,0,0,0,0},
{0,0,0,0,0,0,0},
{0,0,0,0,0,0,1},
{0,0,0,0,0,0,1},
{0,0,0,0,0,0,1},
{0,0,0,0,0,0,1}
};
int[][] board3={
{0,0,0,0,0,0,0},
{0,0,0,0,0,0,0},
{0,0,0,1,0,0,0},
{0,0,0,0,1,0,0},
{0,0,0,0,0,1,0},
{0,0,0,0,0,0,1}
};
int[][] board4={
{0,0,0,0,0,0,0},
{0,0,0,0,0,0,0},
{0,0,0,0,0,0,1},
{0,0,0,0,0,1,0},
{0,0,0,0,1,0,0},
{0,0,0,1,0,0,0}
};
System.out.println(isHori(board1));
System.out.println(isVerti(board2));
System.out.println(isDiag(board3));
System.out.println(isDiag(board4));
이 코드 한번 실행해보세요