src/connect4/Board.java
public static void printConnect5Board(int[][] gameBoard) {

        System.out.println("| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |");
        System.out.println();
        for (int i = 0; i < Constants.CONNECT_5_NUM_OF_ROWS; i++) {
            for (int j = 0; j < Constants.CONNECT_5_NUM_OF_COLUMNS; j++) {
                if (j != Constants.CONNECT_5_NUM_OF_COLUMNS - 1) {
                    if (gameBoard[i][j] != Constants.EMPTY) {
                        System.out.print("| " + gameBoard[i][j] + " ");
                    } else {
                        System.out.print("| " + "-" + " ");
                    }
                } else {
                    if (gameBoard[i][j] != Constants.EMPTY) {
                        System.out.println("| " + gameBoard[i][j] + " |");
                    } else {
                        System.out.println("| " + "-" + " |");
                    }
                }
            }
        }
        System.out.println("\n*********************************");
    }
// It prints the Connect-5 board on the console.
It prints the Connect-5 board on the console.
It prints the Connect - 5 board on the console .
public static void printConnect5Board(int[][] gameBoard) {
        System.out.println("| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |");
        System.out.println();
        for (int i = 0; i < Constants.CONNECT_5_NUM_OF_ROWS; i++) {
            for (int j = 0; j < Constants.CONNECT_5_NUM_OF_COLUMNS; j++) {
                if (j != Constants.CONNECT_5_NUM_OF_COLUMNS - 1) {
                    if (gameBoard[i][j] != Constants.EMPTY) {
                        System.out.print("| " + gameBoard[i][j] + " ");
                    } else {
                        System.out.print("| " + "-" + " ");
                    }
                } else {
                    if (gameBoard[i][j] != Constants.EMPTY) {
                        System.out.println("| " + gameBoard[i][j] + " |");
                    } else {
                        System.out.println("| " + "-" + " |");
                    }
                }
            }
        }
        System.out.println("\n*********************************");
    }
public static void printConnect5Board ( int [ ] [ ] gameBoard ) { System . out . println ( "| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |" ) ; System . out . println ( ) ; for ( int i = 0 ; i < Constants . CONNECT_5_NUM_OF_ROWS ; i ++ ) { for ( int j = 0 ; j < Constants . CONNECT_5_NUM_OF_COLUMNS ; j ++ ) { if ( j != Constants . CONNECT_5_NUM_OF_COLUMNS - 1 ) { if ( gameBoard [ i ] [ j ] != Constants . EMPTY ) { System . out . print ( "| " + gameBoard [ i ] [ j ] + " " ) ; } else { System . out . print ( "| " + "-" + " " ) ; } } else { if ( gameBoard [ i ] [ j ] != Constants . EMPTY ) { System . out . println ( "| " + gameBoard [ i ] [ j ] + " |" ) ; } else { System . out . println ( "| " + "-" + " |" ) ; } } } } System . out . println ( "\n*********************************" ) ; }
It prints the Connect-5 board on the console.
It prints the Connect - 5 board on the console .