Compare commits

..

No commits in common. "16242e95ca8529b5599e930fea237cb7a8bd99e1" and "e2f111dd36216bb77e75914353244d9fa2d03bda" have entirely different histories.

View File

@ -81,13 +81,13 @@ class PongCore {
this.grid = 15; // size of grid squares this.grid = 15; // size of grid squares
this.paddleHeight = this.grid * 5; this.paddleHeight = this.grid * 5;
this.paddleHeightMax = this.canvas.height - this.grid - this.paddleHeight; this.paddleHeightMax = this.canvas.height - this.grid - this.paddleHeight;
this.timeout = 4; // speed in ms this.timeout = 32; // speed in ms
this.width = this.canvas.width; this.width = this.canvas.width;
this.height = this.canvas.height; this.height = this.canvas.height;
this.gameover = false; this.gameover = false;
this.paddleSpeed = 6; this.paddleSpeed = 6;
this.ball = new Ball(new Box(this.width / 2, this.height / 2, this.grid, this.grid)); this.ball = new Ball(new Box(this.width / 2, this.height / 2, this.grid, this.grid));
this.left = new Paddle(new Box(this.grid * 2, this.height / 2 - this.paddleHeight / 2, this.grid, this.paddleHeight), true); this.left = new Paddle(new Box(this.width / 2, this.height / 2 - this.paddleHeight / 2, this.grid, this.paddleHeight), true);
this.right = new Paddle(new Box(this.width - this.grid * 3, this.height / 2 - this.paddleHeight / 2, this.grid, this.paddleHeight), false); this.right = new Paddle(new Box(this.width - this.grid * 3, this.height / 2 - this.paddleHeight / 2, this.grid, this.paddleHeight), false);
} }