Cribbage JD - Classic Card Game Online

Seele01-Flash
By
Cribbage JD brings the beloved classic card game to your screen with authentic gameplay, traditional scoring rules, and the iconic cribbage board for keeping score.

Prompt

MODEL: Seele01-Flash
Please use Three.js to generate a **mobile-first game** with the theme "Cribbage JD". Please read the following detailed game design requirements first, and then generate the code accordingly: ### 1. Assets & Environment * **Visual Style:** Skeuomorphic, realistic tabletop aesthetic. High-quality wood grain textures for the table surface (dark mahogany) and the game board (lighter oak/maple). * **The Board:** Recreate the specific board layout shown in the reference: a "paperclip" shaped track divided into blocks of 5 holes. The track must feature two distinct color lanes (Blue and Red/Orange) for two players. * **Game Objects:** * **Cards:** Standard 52-card deck with crisp, readable vector-style faces. Card backs should feature a classic pattern. * **Pegs:** 3D cylindrical pegs (Red and Blue) with rounded tops to match the board lanes. * **Camera & Lighting:** A fixed top-down perspective (slightly angled for 3D depth). Use warm, soft lighting to simulate an indoor lamp, casting subtle dynamic shadows from the pegs and cards to create depth. * **Mobile Optimization:** Use baked lighting for the board texture to save performance. Limit peg geometry to low-poly cylinders with smooth shading. Texture atlases for all card faces to reduce draw calls. ### 2. Audio Requirements * **BGM:** A calm, relaxing acoustic guitar or soft lounge jazz track that loops seamlessly, evoking a traditional pub or den atmosphere. * **Sound Effects (SFX):** * **Card Interaction:** Crisp "snap" sounds when playing a card, and a "swish" sound for dealing/shuffling. * **Pegging:** A satisfying wooden "thud" or "click" when a peg is inserted into a hole. * **UI:** Soft clicks for buttons; a high-pitched chime for scoring "15" or "31"; a distinct "buzzer" or low tone for a "Go". ### 3. Gameplay Loop * **Game Flow:** 1. **Deal:** Animation of 6 cards dealt to User and Opponent (AI). 2. **The Crib:** User selects 2 cards to discard to the "Crib" (hidden pile). 3. **The Starter:** The deck is cut, revealing the Starter card (check for "Nibs" - 2 points for a Jack). 4. **Pegging Phase:** Players alternate playing cards. The code must track the current count (max 31). Implement scoring logic for 15s, Pairs, Runs, and "Last Card". 5. **The Show:** auto-calculate scores for the User's hand, Opponent's hand, and the Crib. * **Logic:** Implement a robust `ScoreCalculator` function that handles complex Cribbage combinations (15s, flush, pairs, royal pairs, runs of 3/4/5). * **Win Condition:** The first player to move their peg past 121 points wins. ### 4. Mobile Controls & Interaction * **Screen Orientation:** **Landscape Mode** is mandatory to accommodate the wide board and the player's hand side-by-side. * **Touch Controls:** * **Card Selection:** Tap a card to float it upwards (highlight). Tap again or drag forward to play it. * **Pegging:** Peg movement should be automated to speed up gameplay, but visualize the peg "hopping" from the old hole to the new hole. * **UI Layout:** * Player hand positioned at the bottom center. * Score count and "Go" button placed in the thumb-accessible zones (bottom right/left). * Card touch targets must be at least 44x44px. * **Feedback:** * **Haptic:** Trigger light vibration when scoring points or placing a peg. * **Visual:** When points are scored, float the number (e.g., "+2") above the peg or card. Gray out invalid cards during the Pegging phase (cards that would exceed 31). Do not ask for clarification. Do not request confirmation. Directly execute the generation task based on the given instructions.

Game Introduction

About the Game

Cribbage JD is the digital adaptation of one of the world's most enduring card games, also known as Crib, Cribble, and Noddy. This classic 2-player card game has entertained players for centuries with its unique combination of strategy, skill, and chance. The game features the traditional cribbage board with its distinctive pegging holes for score tracking, making it an authentic digital recreation of the beloved tabletop experience.

Core Features

Authentic Cribbage Experience

Cribbage JD faithfully recreates all the traditional elements that make cribbage special:

  • Traditional Scoring System : Complete with fifteen-twos, runs, pairs, and flush scoring
  • Classic Cribbage Board : Beautiful digital representation of the iconic pegging board
  • Two-Phase Gameplay : Experience both the "play" (pegging) phase and "show" phase
  • Starter Card Mechanics : Includes "his heels" and "his nobs" scoring rules
  • Crib Hand Strategy : Master the art of choosing which cards to place in the crib

Cross-Platform Availability

Enjoy Cribbage JD across multiple platforms: - Free Browser Version : Play instantly without downloads on desktop and mobile browsers - Mobile Apps : Available on Android and iOS for gaming on the go - Steam Version : Premium experience for PC gamers - Universal Compatibility : Seamless gameplay across all your devices

Multiplayer Options

Challenge friends or play against AI opponents in this classic 2-player format. The game maintains the traditional turn-based structure that has made cribbage a favorite among card game enthusiasts.

Game Mechanics

The Play Phase (Pegging)

During the pegging phase, players take turns playing cards to achieve scoring combinations: - Fifteen-Twos : Score 2 points when the running total reaches exactly 15 - Runs : Earn 3-7 points for consecutive sequences regardless of play order - Pairs : Score 2 points for matching ranks, with bonuses for trips (6 points) and quads (12 points) - Go and Last Card : Strategic positioning for final points in each round

The Show Phase

After pegging, players count their hands using the four cards dealt plus the starter card: - Hand Combinations : Score all possible fifteen-twos and runs in your hand - Pairs and Trips : Count multiple combinations within your cards - Flush Scoring : Earn bonus points for same-suit hands - Nobs Bonus : Get an extra point for holding the Jack matching the starter suit

Operation Guide

Mouse Controls : Use left mouse button to select and play cards Card Selection : Click to choose cards for the crib during the dealing phase Pegging : Click cards to play them during the pegging phase Scoring : The game automatically calculates and displays all scores Board Navigation : Visual pegging on the traditional cribbage board layout

Getting Started

  1. Deal Phase : Each player receives 6 cards, then discards 2 to the crib
  2. Starter Cut : The non-dealer cuts for the starter card
  3. Pegging Phase : Players alternately play cards, scoring for combinations
  4. Show Phase : Count points in hands, starting with non-dealer
  5. Victory : First player to reach 121 points wins!

Why Play Cribbage JD

Perfect for Strategy Lovers : Cribbage combines mathematical calculation with strategic decision-making. Every card play matters, from choosing what to put in the crib to maximizing your pegging opportunities.

Timeless Appeal : This centuries-old game has stood the test of time because it offers the perfect balance of skill and luck. Whether you're a seasoned cribbage player or new to the game, Cribbage JD provides an engaging experience.

Free and Accessible : The browser version is completely free to play, requiring no downloads or installations. Jump into a game anytime, anywhere.

Learn Traditional Rules : Master the authentic scoring system that has made cribbage a staple in card game collections worldwide. The digital format makes learning easier with automatic scoring and clear visual feedback.

Social Gaming : Challenge friends or family members to matches, continuing the tradition of cribbage as a social card game that brings people together.

Frequently Asked Questions (FAQ)