I can kick myself for not taking advantage of this forum, before. I came here last week and was amazed, how helpful You guys are.
I put this project on back burner, about 4 weeks ago as I got bogged down trying to get CSS right.
So I went ahead and completed Pomodoro Timer and Tic-Tac-Toe.
This is my final project in the Front End Development and for personal reasons, probably unlikely, but I would love to complete Front End Development in next 10 or 12 days ( I get to my 74th birthday!!!). It will do my ego power-of-good.
So what am I asking?
So far, I have got the timer to run and light up the color sequence. For now, I have set random sequence to 5.
I could do with some help in setting out clear guidelines of how I should proceed. I was thinking that if all tasks were broken up in little chunks, I could go ahead and write appropriate functions.
Reading above, it all seems vague and woolly but I hope it makes some sense.
BTW, I did not know what Javascript was until I started this course - so please be gentle.
1 Like
Wow, the design of your Simon game is really nice! Getting bogged down in the CSS paid off.
I’ll probably miss something, but from what I recall here are the individual tasks I tried to implement for the full project:
- Have the computer generate a random sequence of 20 moves.
- Have the computer play
x
number of those moves per turn, where x
= the turn number.
- Each ‘pad’ should light up and make a sound to signify each move.
- The player should press the pads in order and their input needs to be compared to the computer’s last sequence.
- If the player sequence matches the computer sequence, progress to next turn, otherwise repeat the computer sequence.
- Implement a ‘strict’ mode, resulting in ‘game over’ if player sequence is wrong.
I think that was all of it. I won’t reveal how I stored the various states of the game though - that’s the fun bit for you to figure out. (And by ‘fun bit’, I mean the bit that had me tearing my hair out )
1 Like
Thanks for responding. Must say, you are very generous with your compliment. CSS still not right. I need to work on z-index.
I think I have got no 1, sorted although to make life easier, I am working 5 moves.
Would you tackle the tasks in the order you have noted are there any traps?
I sort of understand arrays so I was hoping to use for most of the tasks.
Your CSS is much nicer than mine!
I think that was the order I did them in - It was quite a while ago now, so I’ve likely buried most of the trauma.
I did use arrays for the sequences. I broke mine up into lots of small functions, but it was still quite repetitive…but I think that’s ok, really. For me, the only real trap was keeping all the logic straight in my head.
Oh, I remembered another job: updating the display with the turn number / score.
Thanks. I am encouraged
Nothing wrong with your CSS.
For guys of my vintage, chunkier - the betther.