Students should use this rubric for self-checking their submission. Make sure the functions you write are object-oriented - either class functions (like Player and Enemy) or class prototype functions such as Enemy.prototype.checkCollisions, and that the keyword 'this' is used appropriately within your class and class prototype functions to refer to the object the function is called upon. Also be sure that the readme.md file is updated with your instructions on both how to 1. Run and 2. Play your arcade game.
For detailed instructions on how to get started, check out this guide.
- Added
GameCharacter
class for common functionality ofEnemy
andPlayer
classes. This includes implementation ofrender()
,getNextInstanceId()
andgetBoundingRectangle()
.getNextInstanceId()
generates unique id for each new instance. Enemy
class implemented. This inheritsGameCharacter
and adds implementation ofupdate()
,resetSpeed()
andresetPosition()
.Player
class implemented. This inheritsGameCharacter
and adds implementation ofupdate()
,handleInput()
,reset()
andresetPosition()
.handleInput()
prevents player from going off-screen.- Added
Rectangle
class for purpose of collision detection. This includes implementation ofdoesOverlap()
. - Handled collision detection using logic of whether or not bounding rectangle of
player
overlaps with any ofenemy
objects. - Handled scenario of winning.
- Added missing semicolons
player.reset()
changed tothis.reset()
- Just open the index.html in chrome web browser. OR
- Play the game at http://fend-game.surge.sh