I'm trying to check if all the numbers in a list are nonzero. This is for a game I'm working on, a port of Flow (super popular app for Android and iPhony).
This might seem like a really simple task, but I'm using the Axe language.
What I had originally was (changed a bit so it makes sense in BASIC)
At the end of my game loop, which is a Repeat getKey(15) or Z
(the getKey(15) is for Clear).
The problem is that Axe uses 2 byte variables - 16 bits. Which means that numbers go from 0 to 2^16-1 or 0-65535. Now it just so happens that I have a bunch of 2s - 16 in the stage I'm working with, in fact…. So it gets to 65536/2, then multiplies by 2. Then it's 0 and the game doesn't end with a YOU WIN.
Basically, I need a new way to check for nonzero numbers.