Skip to content

Commit

Permalink
6.7.3. Массив из диагонали матрицы;
Browse files Browse the repository at this point in the history
  • Loading branch information
Temzor committed Oct 4, 2023
1 parent 1c36818 commit e3342b4
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/main/java/ru/j4j/array/MatrixCheck.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,7 @@ public static boolean monoVertical(char[][] board, int column) {
public static char[] extractDiagonal(char[][] board) {
char[] boardChars = new char[board.length];
for (int i = 0; i < board.length; i++) {
for (int j = 0; j < board[i].length; j++) {
if (board[i][j] != ' ') {
boardChars[i] = board[i][j];
}
}
boardChars[i] = board[i][i];
}
return boardChars;
}
Expand Down

0 comments on commit e3342b4

Please sign in to comment.