private boolean checkWinInHorizontalAndVerticalLines (IPlayer player) {

        int leftLineCount = 0;

        int topLineCount = 0;

        for (int i=0; i<SIZE_OF_MATRIX; i++) {

            for (int k=0; k<SIZE_OF_MATRIX; k++) {

                if (matrix[i][k] == player.getMark()) {

                    leftLineCount++;

                }

                if (matrix[k][i] == player.getMark()) {

                    topLineCount++;

                }

                if (winnerScore(leftLineCount) || winnerScore(topLineCount)) {

                    return true;

                }

            }

            leftLineCount = 0;

            topLineCount = 0;
        }

        return false;

    }