Skip to main content
6 votes
Accepted

Play audio files when buttons are clicked in Simon Says

Duplicate Code Duplicate code is generally considered a bad practice since making a change to one version could require a change to all the versions. It's easier to maintain your code if design ...
Joshua Dawson's user avatar
6 votes

Play audio files when buttons are clicked in Simon Says

I recommend removing the inline onclick event handlers from your HTML document for a cleaner separation of markup and logic / JavaScript similarly to how you ...
le_m's user avatar
  • 1,925
5 votes

Simon memory game

Most of this will come down to reading PEP8, however I'll state them here anyway. if statements don't need parentheses, so don't put them around them. You seem to ...
syb0rg's user avatar
  • 21.8k
4 votes
Accepted

Simon memory game

Style Aside of @syb0rg's answer, there are some comments in the text intended to describe the method that follows. These should be docstrings instead. You also happen to have magic numbers and ...
301_Moved_Permanently's user avatar
3 votes

Simon in Javascript

General Feedback The code appears to work acceptable. The HTML does have javascript calls inline (e.g. onclick="pressYellow()"). It would be better to separate the ...
Sᴀᴍ Onᴇᴌᴀ's user avatar
3 votes
Accepted

Simon Game in JavaScript

JavaScript The code looks nice and short. I like the comments on the strict and lastChance variables since they explain the ...
Roland Illig's user avatar
  • 21.3k
3 votes
Accepted

Simon says in Unity

private readonly IList<T> _circularListNavigator = new List<T>(); This isn't a navigator yet. I suggest naming it simply ...
t3chb0t's user avatar
  • 44.3k
2 votes

Animate and play sounds in Simon Says 'the Angular way'

Your controller could store a "padToLightUp" value. Then use ng-class={'lightUpPad': padToLightUp == 1} (where 1 is the pad number, so it could be 1, or 2, 3, 4...)....
Pimgd's user avatar
  • 22.3k
2 votes
Accepted

A Game Of Simon

Duplicate Code A lot of your code is really similar to other parts. The duplication is generally found when working with your colors. For example, take a look at your animiateColor functions. The ...
Joshua Dawson's user avatar
2 votes

Two setIntervals activating in a sequence to change CSS

What is the game object for? I assume it's for keeping all game states together, which is good, but I can't tell from this example. ...
Kruga's user avatar
  • 1,124
1 vote
Accepted

Simon Says implementation using jQuery

Separate game for unrelated stuff The core of a game should be independent of the user interface. It should be able to work using the DOM or a console. It could be sounds sequences, words, shapes or ...
Blindman67's user avatar
  • 22.2k
1 vote

Two setIntervals activating in a sequence to change CSS

Never use setInterval. Don't use clearTimeout, or clearInterval, and with that don't use <...
Blindman67's user avatar
  • 22.2k
1 vote

Play audio files when buttons are clicked in Simon Says

One option would be to do something like: ...
Marc Rohloff's user avatar
  • 3,477
1 vote
Accepted

Simon Says using Arduino UNO

Here are a few suggestions, in my opinion, to improve your code: Using Port Registers: You use PORTD, PIND, and ...
stochastic13's user avatar
1 vote
Accepted

First Game: Simon Game

Python has an official style-guide, PEP8, which you are encouraged to follow to improve readability (mostly by others, but also yourself). On e of its recommendations is using spaces around operators, ...
Graipher's user avatar
  • 41k

Only top scored, non community-wiki answers of a minimum length are eligible