<<12/17>> I get an error when attempting to assign a negative number to a variable, such as let a = -1. It occurs even after declaring the variable and then later attempting to assign a negative number to that variable.
I just had a thought, how about this code?
10 let a = 11 20 a = a * -1 30 println a
I'll go test it.
Bonk! Even a = a * (-1) gives a "Bad token 4 at line 20" BASIC error".
The way I have found to get around this is, if I want to assign -11 to the variable a I use a for loop.
While typing that code onto the Badge I came up with a faster idea.
It was:
10 let a = 0 20 for i = 0 to 10 30 a = a - 1 40 next i 50 println a
It should be:
10 let a = 0 20 a = a -11 30 println a
Such an easy thing to overlook when I was making it harder than it has to be.
I guess I'll have to learn to use GitHub so I can have the code readily available.
The 'game' I made previously to this one has two dots randomly wandering around the screen. The dots are different colors. The dot that lands on a space that is occupied by the other dot is declared as the winner. It is a non participatory game, but you can watch it. Out of coding that game came the idea of the space shooter. I worked on three or four iterations of the HUD before I decided that the current one is the one I like. It sits in the center of the screen and looks like:
_____________
/\ /\
/ \ / \
/ \ / \
| \ / |
| \ / |
| \ / |
------------ -------------
| / \ |
| / \ |
| / \ |
\ / \ /
\ / \ /
\/___________\/
Well, something like that.