Edited readme.md and uploaded Flow Chart#24
Conversation
|
|
||
| function randomColor () { | ||
| var col = colorArr[randomNum()] | ||
| return col |
There was a problem hiding this comment.
You may do this : return colorArr[randomNum()]
| scoreObj.score += 10 | ||
| scoreObj.scoreBoard.text(`Score : ${scoreObj.score}`) | ||
| // TODO: No Click? click = false | ||
| } else if (recArr[count - 1] != recArr[count - n]) { |
| audioCorrect() | ||
| scoreObj.score += 10 | ||
| scoreObj.scoreBoard.text(`Score : ${scoreObj.score}`) | ||
| } else if (recCol[count - 1] != recCol[count - n]) { |
| // Random Number Generator | ||
| function randomNum () { | ||
| var index = Math.floor(Math.random() * 8) | ||
| return index |
| } | ||
|
|
||
| function audioCorrect () { | ||
| return document.getElementById('audioCorrect').play() |
| var recCol = [] | ||
| var count = 0 | ||
| var index = 0 | ||
| var on = 0 |
There was a problem hiding this comment.
maybe it is a confusing name with .on(). You can try gameOn , gameStart .
| <div class="container"> | ||
| <h1>Dual N Back Game Instructions</h1> | ||
|
|
||
| <h3>Each turn a random location and color will flash on the gameboard. The goal is to memorize the location and color 'n' turns back. Currently n = 1. If the location or color of current turn is the same as that of the previous turn, we should trigger the location or color button</h3><br> |
There was a problem hiding this comment.
Why everything is h3 tags here?
| <body> | ||
| <audio id="audioCorrect" type="audio/mpeg" src="./audio/correctAnswer.mp3"></audio> | ||
| <audio id="audioWrong" type="audio/mpeg" src="./audio/wrongAnswer.mp3"></audio> | ||
| <div class="container"> |
| var index = 0 | ||
| var on = 0 | ||
| var refreshIntervalId | ||
| var n = 2 // Difficulty Setting |
There was a problem hiding this comment.
why dont name this variable difficultyLevel instead?
| gameOverDiv.css('display', 'none') | ||
| }) | ||
| $colorBtn.on('click', compareColor) | ||
| $(document).on('keydown', function (e) { |
There was a problem hiding this comment.
could you give some spaces in between these codes? group them logically so it's easier to be read
|
Project Workflow: 3 / 5 GlowScaling down on the idea. GrowNeed more detailed commit message, not like 'second try'. Things to look forI know it is hard to be familiar with many methods. Just keep practicing! |
No description provided.