Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions game.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<html>
<canvas id="gameCanvas" width="800" height="600"></canvas>


<script>
var canvas;
var canvas;//creating the space.
var canvasContext;
var ballX = 50;
var ballSpeedX = 10;// to control the ball speed.
Expand Down Expand Up @@ -60,7 +60,7 @@
}



//function for the ball and setting.
function callBoth() {
moveEverything();
drawEverything();
Expand All @@ -79,7 +79,7 @@
ballY = canvas.height/2;
}


//Having the movement for computer.
function computermovement() {
var paddle2YCenter = paddle2Y + (PADDLE_HEIGHT/2);
if(paddle2YCenter < ballY) {
Expand Down