-
Notifications
You must be signed in to change notification settings - Fork 187
added simonsaysGAME #353
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added simonsaysGAME #353
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,39 @@ | ||||||||||
| # 🎮 Simon Says Game | ||||||||||
|
|
||||||||||
|  | ||||||||||
|
|
||||||||||
| ## Description | ||||||||||
|
|
||||||||||
| A memory game where players repeat sequences of colored buttons. Each round adds a new color to the sequence, and the player must remember and repeat it correctly to advance levels. | ||||||||||
|
|
||||||||||
| ## Features | ||||||||||
|
|
||||||||||
| - Start button to begin the game | ||||||||||
| - Colored buttons (Green, Red, Yellow, Blue) that flash | ||||||||||
| - Adds a new color each level | ||||||||||
| - Level tracking and Game Over message | ||||||||||
|
|
||||||||||
| ## Concepts Practiced | ||||||||||
|
|
||||||||||
| - DOM manipulation | ||||||||||
| - Event listeners | ||||||||||
| - Async functions and Promises | ||||||||||
| - Game logic and sequence handling | ||||||||||
| - CSS animations and visual feedback | ||||||||||
|
|
||||||||||
| ## Bonus Challenge | ||||||||||
|
|
||||||||||
| - Show the **score** after the game is over (score = number of levels completed). | ||||||||||
| - Add **sound effects** for each button click. | ||||||||||
| - Add **glowing animation** for each button to make the game more interactive. | ||||||||||
|
|
||||||||||
| ## Live Demo | ||||||||||
|
|
||||||||||
| <div align="center"> | ||||||||||
| <iframe src="https://codesandbox.io/p/sandbox/frosty-nobel-849xrz" | ||||||||||
| style="width:100%; height: 500px; border:0; border-radius: 4px; overflow:hidden;" | ||||||||||
| title="simon-says-game" | ||||||||||
|
||||||||||
| title="simon-says-game" | |
| title="simon-says-game" loading="lazy" |
Copilot
AI
Oct 17, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The iframe src points to a CodeSandbox editor URL (/p/sandbox/...) which is typically blocked from embedding; use the embed endpoint instead. Replace with https://codesandbox.io/embed/frosty-nobel-849xrz (optionally add query params like ?fontsize=14&hidenavigation=1&theme=light).
Copilot
AI
Oct 17, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The iframe permissions and sandbox flags are overly broad for a simple game embed; apply the principle of least privilege. Suggest narrowing to only what’s needed, e.g., allow="fullscreen" and sandbox="allow-scripts allow-same-origin".
| allow="accelerometer; ambient-light-sensor; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; payment; usb; vr; xr-spatial-tracking" | |
| sandbox="allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts" | |
| allow="fullscreen" | |
| sandbox="allow-scripts allow-same-origin" |
Copilot
AI
Oct 17, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Provide a fallback link for users/browsers that block iframes. Add a link just below the iframe, e.g.,
<a href="https://codesandbox.io/s/frosty-nobel-849xrz\" target="_blank" rel="noopener noreferrer">Open live demo on CodeSandbox
.| ></iframe> | |
| ></iframe> | |
| <p><a href="https://codesandbox.io/s/frosty-nobel-849xrz" target="_blank" rel="noopener noreferrer">Open live demo on CodeSandbox</a></p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] The align attribute is obsolete in HTML5. Prefer a style-based approach, e.g., <div style="text-align:center"> or a CSS class.