Classic-Arcade-Game
Project #3 of Udacity’s Front-End Web Developer Nanodegree. The task was to recreate the classic arcade game [Frogger]with provided visual assets and a game loop engine by
1.Implementing the player and enemy entities using Pseudo classical Classes Pattern
2. Adding the correspoding code to support the additional functions
1. Clone this repo:
$ git clone https://github.com/joeyzhang1989/Classic-Arcade-Game-Clone.git
`
2. Serve the application:
$ python -m SimpleHTTPServer
You can use the Python SimpleHTTPServer to serve this webpage game on your local machine.
3. Open the application:
$ open "http://localhost:8000"
*Pseudo classical Classes Pattern
var Player = function (x,y) {
this.x = x;
this.y = y;
this.sprite = 'images/char-boy.png';
this.xNow = x;
this.yNow = y;
};
//Update the player position
Player.prototype.update = function () {
this.xNow = this.x;
this.yNow = this.y;
};
var Enemy = function(x,y) {
this.x = x;
this.y = y;
this.sprite = 'images/enemy-bug.png';
};
This project is a public domain work, dedicated using
MIT. Feel free to do
whatever you want with it.