Once an edge is chosen to traverse. (equivalently, once a variable has been chosen to enter the basis), we want to travel down the edge as far as possible.
Normally we can only travel down the edge a limited amount (equivalently, increase the value of the incoming variable), since we hit a boundary of the feasiblity region - going further will force some variable to be negative. If no variables are decresing as we go along the edge, the linear program is unbounded.
The way to calculate if a linear program is unbounded is to perform the calculation B yB = aNp where aNp is the column of A of the entering variable. If all of the elements of yB are 0, then the linear program is unbounded and you can stop.
If the linear program is not unbounded, then go to the next step.