src/connect4/Board.java
public boolean checkWinState() {

        int times4InARowPlayer1 = countNInARow(checkersInARow, Constants.P1);
        if (times4InARowPlayer1 > 0) {
            setWinner(Constants.P1);
            return true;
        }

        int times4InARowPlayer2 = countNInARow(checkersInARow, Constants.P2);
        if (times4InARowPlayer2 > 0) {
            setWinner(Constants.P2);
            return true;
        }

        setWinner(Constants.EMPTY);  // set nobody as the winner
        return false;
    }
/*
     * Terminal win check.
     * It checks whether somebody has won the game.
     */
Terminal win check.
It checks whether somebody has won the game.
Terminal win check . It checks whether somebody has won the game .
public boolean checkWinState() {
        int times4InARowPlayer1 = countNInARow(checkersInARow, Constants.P1);
        if (times4InARowPlayer1 > 0) {
            setWinner(Constants.P1);
            return true;
        }
        int times4InARowPlayer2 = countNInARow(checkersInARow, Constants.P2);
        if (times4InARowPlayer2 > 0) {
            setWinner(Constants.P2);
            return true;
        }
        setWinner(Constants.EMPTY);  
        return false;
    }
public boolean checkWinState ( ) { int times4InARowPlayer1 = countNInARow ( checkersInARow , Constants . P1 ) ; if ( times4InARowPlayer1 > 0 ) { setWinner ( Constants . P1 ) ; return true ; } int times4InARowPlayer2 = countNInARow ( checkersInARow , Constants . P2 ) ; if ( times4InARowPlayer2 > 0 ) { setWinner ( Constants . P2 ) ; return true ; } setWinner ( Constants . EMPTY ) ; return false ; }
Terminal win check.
Terminal win check .
// set nobody as the winner