Skip to content

Commit

Permalink
64
Browse files Browse the repository at this point in the history
  • Loading branch information
heybobjones committed Jun 25, 2024
1 parent e26bc95 commit d3847f0
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ function moveObstacles() {
obstacles.forEach(obstacle => {
obstacle.x -= obstacle.speed;

switch (obstacle.type) {
switch(obstacle.type) {
case 'crypto':
obstacle.y += Math.sin(obstacle.x * 0.2) * 4; // Increase amplitude and frequency
break;
Expand All @@ -217,9 +217,8 @@ function moveObstacles() {
obstacle.y += dy / dist * 1.0;
break;
case 'marketer':
if (Math.random() < 0.005 && obstacle.radius > 15) { // Increase probability of multiplication
obstacle.radius *= 0.7;
obstacles.push({ ...obstacle, y: obstacle.y + Math.random() * 100 - 50 }); // Wider area
if (Math.random() < 0.005) { // Increase probability of multiplication
obstacles.push({...obstacle, y: obstacle.y + Math.random() * 100 - 50}); // Wider area
}
break;
case 'fitness':
Expand Down

0 comments on commit d3847f0

Please sign in to comment.