Classic Solitaire

Seele01-Flash
By
Classic Solitaire is the timeless card game you know and love, playable for free on any device. Build four foundations from Ace to King and race against the clock in this perfectly crafted HTML5 version.

Prompt

MODEL: Seele01-Flash
Please use Three.js to generate a **mobile-first game** with the theme "Classic Solitaire". Please read the following detailed game design requirements first, and then generate the code accordingly: ### 1. Assets & Environment * **Visual Style**: Mimic a high-quality, digital casino experience. Use a rich, dark green felt texture for the game board (table). The camera should be a fixed, top-down perspective (OrthographicCamera is preferred for clear card readability) or a slight angled perspective (PerspectiveCamera) to show 3D depth of card stacks. * **Card Models**: Use thin `BoxGeometry` or double-sided `PlaneGeometry` for cards. The front face requires a texture atlas/spritesheet for the standard 52-card deck (Hearts, Diamonds, Clubs, Spades). The back face should feature a classic geometric pattern (blue or red). * **Lighting**: Soft ambient lighting combined with a directional light casting subtle shadows to separate the cards from the table, enhancing the perception of depth when cards are stacked. * **Performance**: Use `InstancedMesh` for rendering the cards to minimize draw calls on mobile devices. Textures should be compressed (ktx2 or similar) to ensure fast loading. ### 2. Audio Requirements * **BGM**: A relaxing, low-fidelity "Lounge Jazz" or "Soft Piano" track that loops seamlessly, evoking a calm concentration atmosphere. * **Sound Effects (SFX)**: * **Card Flip**: A crisp, snapping sound ("thwip"). * **Card Slide**: A friction sound mimicking paper sliding on felt. * **Card Docking**: A satisfying "click" or soft thud when a card successfully snaps into a Foundation or Tableau pile. * **Error**: A subtle vibration sound or dull thud when an invalid move is attempted. * **Victory**: A cascading fanfare or chime effect when a level is cleared. ### 3. Gameplay Loop * **Core Mechanics (Klondike Rules)**: * **Setup**: 7 Tableau piles (1 to 7 cards, top face up), 4 empty Foundation slots, and a Draw pile. * **Objective**: Move all cards to the 4 Foundations, sorted by Suit, from Ace to King. * **Tableau Rules**: Build piles downward (King to Ace) in alternating colors (Red on Black, Black on Red). Empty Tableau spots can only be filled by a King. * **Draw Pile**: Tap to reveal cards (Draw 1 or Draw 3 depending on difficulty/level logic). * **Level System**: The game consists of 3 levels. Completion of one level immediately triggers the setup for the next. The game is timed (Race against the clock). * **Undo Feature**: Include an "Undo" button UI. Limit this function to **exactly 3 uses** per game/level as per the game description. * **Win/Loss**: * **Win**: All cards placed in Foundations. * **Loss**: No more legal moves available (auto-detection preferred but not strictly required if the timer runs out). ### 4. Mobile Controls & Interaction * **Touch Interaction**: Use `Raycaster` to handle touch events. * **Drag & Drop**: The primary control. Users touch a card, drag it to a new pile, and release. The card must visually lift (increase Z-axis) and cast a larger shadow while being dragged. * **Tap-to-Move**: Optional "Smart Move" where tapping a card automatically moves it to a valid Foundation or Tableau spot if applicable. * **Responsive Layout**: * **Orientation**: Lock to **Landscape** mode for best card layout (7 columns are wide). If Portrait is required, scale the camera zoom significantly to fit the width. * **Hit Testing**: Ensure card hitboxes are slightly larger than the visual mesh to accommodate "fat finger" errors on small screens. * **UI & Feedback**: * **Haptic Feedback**: Trigger a short vibration (`navigator.vibrate(20)`) when a card is successfully dropped. * **Snap-to-Grid**: If a card is dropped near a valid target, it should smoothly `lerp` (animate) into the correct position. If dropped in an invalid spot, it should `lerp` back to its original position. * **HUD**: Display "Time", "Score", and the "Undo (x/3)" button in the top corners, ensuring they are at least 44x44px for touch accessibility. Do not ask for clarification. Do not request confirmation. Directly execute the generation task based on the given instructions.

Game Introduction

About the Game

Classic Solitaire is the authentic digital version of the world's most beloved card game. With a stellar 4.1/5 rating, this HTML5 game delivers the pure, unmodified solitaire experience that millions of players have enjoyed for generations. No gimmicks, no unnecessary features – just the classic gameplay you expect.

This isn't just another solitaire clone. It's a carefully crafted tribute to the original game, featuring three progressively challenging levels that will test even experienced players. Each game is timed, adding an exciting element of pressure as you race against the clock to complete your foundations.

Core Features

Pure Classic Gameplay

Experience solitaire exactly as it was meant to be played. The objective remains beautifully simple: create four foundations of the same suit, each running from Ace to King. No confusing rule variations or modern twists – just authentic solitaire.

Three Challenging Levels

While there are only three levels, don't expect quick victories. Each level presents unique card arrangements that require strategic thinking and careful planning. Master all three to prove your solitaire expertise.

Timed Competition

Every game is timed, transforming the relaxing card game into an exciting race against the clock. Your final score combines completion time with strategic efficiency, creating a competitive element that keeps you coming back.

Global Leaderboard

Complete all three levels and your score automatically enters the global competition. Achieve a top score and see your username displayed for all players to admire. This feature adds long-term motivation and bragging rights.

Cross-Platform Excellence

Built with HTML5 technology, Classic Solitaire runs smoothly on any modern browser. Whether you're on a desktop computer, smartphone, or tablet, the game adapts perfectly to your screen size and input method.

Gameplay Instructions

Basic Rules

The core objective is building four foundation piles, one for each suit (hearts, diamonds, clubs, spades). Each foundation must start with an Ace and build up sequentially to the King, using only cards of the same suit.

Card Movement

  • Drag and Drop : Move cards by dragging them to valid positions
  • Foundation Building : Place Aces in the top spaces, then build up by suit
  • Tableau Stacking : Stack cards in descending order with alternating colors
  • Empty Spaces : Only Kings can fill empty tableau columns
  • Stock Pile : Click the deck to reveal additional cards when needed

Strategic Elements

Success requires more than luck. Plan your moves carefully, as each decision affects your ability to access buried cards. The undo feature (available 3 times per game) provides some forgiveness for strategic mistakes.

Scoring System

Your score depends on completion time and move efficiency. Faster completion times and fewer moves result in higher scores, encouraging both speed and strategy.

Why Play This Solitaire Game

Authentic Experience

This isn't a flashy modern interpretation – it's solitaire in its purest form. If you learned solitaire with physical cards, you'll feel immediately at home with the familiar rules and layout.

Brain Training Benefits

Solitaire provides excellent mental exercise, improving pattern recognition, strategic planning, and problem-solving skills. The timed element adds focus and concentration training.

Stress Relief

Despite the timer, solitaire remains inherently relaxing. The methodical nature of card sorting and the satisfaction of completing foundations provide excellent stress relief.

No Commitment Gaming

Each game takes just a few minutes, making it perfect for quick breaks, commute entertainment, or whenever you need a brief mental diversion.

Completely Free

Enjoy unlimited gameplay without any costs, advertisements interruptions, or premium features locked behind paywalls. This is classic gaming at its most accessible.

Frequently Asked Questions (FAQ)