Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

🧠 Simon Says — Memory Challenge

A beautifully designed, browser-based Simon Says memory game built with pure HTML, CSS, and JavaScript. Watch the colour sequence, repeat it perfectly, and see how far your memory can take you!


🎮 Live Demo

Open index.html directly in any modern browser — no build step, no dependencies.


✨ Features

  • 🎯 Classic Simon Says gameplay — watch the sequence, repeat it in order
  • Adaptive speed — sequences get faster as your level increases
  • 🧩 Circular board layout — styled like a real Simon toy with 4 colour quadrants
  • 🏆 Best score persistence — your personal best is saved in localStorage
  • 👁️ Animated centre hub — shows real-time game state (Watch / Your Turn / Correct / Game Over)
  • 📊 Live score strip — tracks Level, Sequence length, and Best score
  • 🎨 Premium dark UI — glassmorphism card, ambient orb background, grid overlay
  • ⌨️ Keyboard + click support — press any key or click Start to begin
  • 📱 Fully responsive — works on desktop and mobile screens

🕹️ How to Play

  1. Open index.html in your browser
  2. Click "Start Game" or press any key on your keyboard
  3. Watch — Simon will flash one or more coloured quadrants in sequence
  4. Repeat — click the quadrants in the exact same order
  5. Level up — each correct round adds one more step to the sequence
  6. Game over — one wrong click ends the game and shows your score

💡 Tip: Use binary search thinking — notice which quadrant glows, not just the colour!


📁 Project Structure

Simon-Game-main/
├── index.html   # Game layout — board, hub, status panel, score strip
├── style.css    # Full visual design — dark theme, circular board, animations
├── app.js       # All game logic — sequences, input handling, scoring, localStorage
└── README.md    # You're here!

🔧 Technical Details

Game Logic (app.js)

Function Purpose
beginGame() Initialises state, hides start button, shows score strip
levelUp() Increments level, picks a new random colour, plays sequence
playSequence() Flashes each colour in gameSeq with staggered timing
handleBtnClick() Captures user clicks when accepting is true
checkAns(idx) Validates each tap against gameSeq; triggers level up or game over
gameOver() Flashes screen, saves best score, resets state
btnFlash() Applies .flash CSS class for Simon's turn
userFlash() Applies .userFlash CSS class for player feedback

Adaptive Speed

The game gets progressively harder — flash duration and interval both shrink each level:

const delay   = Math.max(300, 650 - level * 25);  // minimum 300ms
const flashMs = Math.max(150, 400 - level * 15);  // minimum 150ms

Colours & IDs

Quadrant ID / Class Position
🔴 Red #red Top-left
🟡 Yellow #yellow Top-right
🟢 Green #green Bottom-left
🟣 Purple #purple Bottom-right

🚀 Getting Started

No installation needed. Just clone or download and open in a browser:

git clone https://github.com/Suhas-Bhatt/Simon-Game.git
cd Simon-Game
# Open index.html in your browser

Or simply double-click index.html.


🛠️ Built With

  • HTML5 — semantic structure
  • CSS3 — custom properties, glassmorphism, keyframe animations, CSS Grid
  • Vanilla JavaScript — zero dependencies, pure DOM manipulation
  • Google FontsOutfit
  • localStorage — for best score persistence

📸 Screens

State Description
🟢 Idle Start button visible, press any key or click to begin
👁️ Watching Simon flashes the sequence — hub shows "Watch…"
Your Turn Hub shows "YOUR TURN", player input accepted
Correct Brief success flash before next level loads
Game Over Screen flashes red, score shown, Play Again button appears

📝 License

This project is open source and available under the MIT License.


Made with ❤️ — Challenge your memory!

About

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages