Try my Simon? Please?

Try my Simon? Please?
0

#1

Just finished it and I’m a little pleased with myself. Please give it a try.


#2

Let me point out a few redundancies in your code.

At line 139:
if (correct !== false) {
can be written as
if (correct) {

At line 108:

if ( moveList.length <= 4 ) {
  speed = noteDur[0];
} else if ( moveList.length >= 5 && moveList.length <= 13) {
  speed = noteDur[1];
} else  {
  speed = noteDur[2];
} 

Checking if moveList.length >= 5 is not necessary.


Being able to adjust the needed wins is a nice feature too


#3

Thanks, those are good points.

I’m not sure what I was thinking with the first one. The second one just slipped past me.

Being able to adjust the needed wins was mainly for testing - rather than have people try to get 20 right to see if the “win” functioned correctly. Then I just decided to leave it in.

Thanks,
Kevin