Browse Source

Use GD.random()

jamesbowman 8 years ago
parent
commit
27fba17bc8
1 changed files with 1 additions and 1 deletions
  1. 1 1
      invaders.ino

+ 1 - 1
invaders.ino

@@ -295,7 +295,7 @@ public:
                         fake = (fake + 1) & 511;
                         control_right = fake < 256;
                         control_left  = 256 <= fake;
-                        control_fire = (random() % 70) == 0;
+                        control_fire = (GD.random(70)) == 0;
 
                         if (control_left) {
                         xpos -= playerSpeed;