Scroll usage pseudocode

Decision making in case of infinite loop
Ensuring all item usage

Pseudocode to determine item priority