i am currently working on a system that detect the value input and carry out an action is the value is accepted but rests everything when the value is denied. i have an algorithm but i don't seem to be able to transfer it into coding.
Set x as intiger
Set y as integer
Set z as integer
z = y - (value (which i will have to calculate))
value input is equal to x.
y is the maximum value
z is the minimum value
y increases as x increases (in other words y = x), but when x decreases y does not decrease.
while x >= z then, (does action), else
stop action and reset y value and z value to 0
record next value.
Please forgive me for my crappy algorithm writing abilities.
All comments and solutions will be appreciated.