Skip to content

Conversation

@amarcjones
Copy link

No description provided.

clear(); //clear the canvas
drawRandomShape(); //add a random shape track scoring
countDown(); //start timer countdown
endGaame() //use as a callback for when timer countdown expires
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this is a typo. But I think that typo was actually making your code work. You don't want to call endGame there because your game will never start.


function countDown() {
timerCountDown = 30;
var int = setInterval(function () {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe call this something like intervalId. Int is usually an integer type (which doesn't really exist in JS) so it can be a little confusing to name a variable int.

expectedKeysMap = {white0: 38, red1: 40, red0: 37, white1: 39},
timerSpan = document.getElementById("time-remaining"),
scoreSpan = document.getElementById("score-val"),
seconds = 3,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overally good job. There are a few comments, but the code looks good.

@amarcjones
Copy link
Author

amarcjones commented Aug 8, 2017 via email

Copy link
Contributor

@tigarcia tigarcia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Call apply and bind exercises look good. Looks like you're missing the hacker snooze ajax exercise and the prototypes exercise. Do you need to add more to the pull request?


function arrayFrom() {
var finalArr = [];
for(var i = 0; i < arguments.length; i++) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can skip the new array and the loop by using slice:

  return Array.prototype.slice.apply(arguments);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants