diff --git a/js/app.js b/js/app.js index 08af480..0e140e7 100644 --- a/js/app.js +++ b/js/app.js @@ -7,8 +7,8 @@ const FishApp = { return { force: 0, pull: false, - pullRate: 1.5, - dropRate: 2.5, + pullRate: 2, + dropRate: 3, intervalID: null, fishMovementIntervalID: null, fishy: null, @@ -17,7 +17,7 @@ const FishApp = { name: 'Freddy the fishy', strength: 3, quirkyness: 10, - points: 100, + points: 10, position: 0, sprite: './assets/fishTile_074.png' } @@ -61,18 +61,17 @@ const FishApp = { this.fishy.position = 0; this.fishMovementIntervalID = setInterval(() => { - let up = Math.floor(Math.random() * 100) < 10; - console.log(up); + let up = Math.floor(Math.random() * 101) <= 55; if (up) { if (vue.fishy.position < 250) { vue.fishy.position += vue.fishy.quirkyness; } else { - vue.fishy.position -= vue.fishy.quirkyness * 4; + vue.fishy.position -= vue.fishy.quirkyness; } } else { - if (vue.fishy.position < 0) { - vue.fishy.position = Number(vue.fishy.position) - (vue.fishy.quirkyness * 4); + if (vue.fishy.position >= vue.fishy.quirkyness) { + vue.fishy.position = Number(vue.fishy.position) - vue.fishy.quirkyness; } } }, 100);