Note that, if you use a Search Engine to find similar programs on the web, we will find these programs too. So don't do it because you will get caught and you will get an F in the course (this is cheating). Don't look for code to use for your project on the web or from other students (current or past). Just do your project alone using the help given in this project description and from your instructor and GTA only. Finally, you should not post your code nor deploy your project on a public web site.
You will do this project on your own PC/laptop.
You have to use the Mozilla Firefox web browser
You need to activate the Debugger from the browser Developer tools.
You may click on "Show in Separate Window" to get the debugger on a separate window.
The pong court is 800x500px, the pong ball is 20x20px, and the paddle is 102x14px. When you click on the Start button or left-click on the court, the ball must start from a random place at the left border of the court at a random angle between -π/4 and π/4. The paddle can move up and down on the right border by just moving the mouse (without clicking the mouse). The ball bounces on the left, top, and bottom borders of the court. Everytime you hit the ball with the paddle, you add one strike. If the ball crosses the right border (the dotted line), the game is suspended and the strikes so far becomes your score. You would need to click on the Start button or click on the court to restart with a zero number of strikes. So the goal of this game is to move the paddle to protect the right border by hitting the ball.
<p id="x" style="position: relative; left: 50px; top: 100px;"> ... </p>To move this element, just change the left/top attributes using code:
document.getElementById("x").style.top = "10px";Note that the values that you set the left/top attributes must have units (e.g., "10px"). It will not work if you set them to numbers.
Use the form below to submit your pong.html and pong.js files. We do not accept email or hardcopy submissions. These files are automatically uploaded directly into your personal class account for this particular project, so you don't have to include your name or student ID or project number in the file name. You may submit your files as many times as you like, but only the most recently submitted files will be retained and evaluated (newly submitted files replace the old files under the same file name). After you submit the files, please double-check that your submitted files are correct by clicking on the Status link and by playing your game on your browser.Last modified: 09/14/2017 by Leonidas Fegaras