Skip to content

Commit

Permalink
Revert "refined random spawn values"
Browse files Browse the repository at this point in the history
This reverts commit 460652f.
  • Loading branch information
rlszabo committed Apr 4, 2023
1 parent c09258a commit 6b7cc04
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/panel/states.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,13 +115,13 @@ export class BallState {
private randomizeBallState(): Array<number> {
/* velocity */
const randVx: Array<number> = [ //avoids values close to 0
-1 * (Math.floor(Math.random() * 12) + 3), //left
Math.floor(Math.random() * 12) + 3 // right
-1 * (Math.floor(Math.random() * 20) + 4), //left
Math.floor(Math.random() * 20) + 4 // right
];
const randVy: number = Math.floor((Math.random() * 20) - 10);
/* position */
const randX: number = Math.floor(Math.random() * (window.innerWidth * 0.80) + 10);
const randY: number = Math.floor(Math.random() * (window.innerHeight * 0.60)) + 30;
const randY: number = Math.floor(Math.random() * (window.innerHeight * 0.60)) + 40;

/* flip a coin to throw left or right */
const coin: number = Math.floor(Math.random() * 2);
Expand Down

0 comments on commit 6b7cc04

Please sign in to comment.