There is a very simple way to filter out the random numbers that are not in a circle.
Try this:
do { // get in a circle <<<<<<<<<<<<<<<<<
myX = Math.random() * 200 -...
Type: Posts; User: Norm
There is a very simple way to filter out the random numbers that are not in a circle.
Try this:
do { // get in a circle <<<<<<<<<<<<<<<<<
myX = Math.random() * 200 -...
This is the square I was talking about:
starX = Math.random() * 200 - 99;//star starts in a small square
starY = Math.random() * 200 - 99;//in the center
Change this logic to chose...
Small comments.
Several of your variables are defined at the class level but are only used at in one method. They could be defined local to that method.
if (valid == "false")
Use the equals()...