Skip to content

davestanyer/500score

Repository files navigation

๐ŸŽฏ 500Score

Professional Card Game Scoring Application

React TypeScript Vite Tailwind CSS

A sleek, modern React application for tracking scores in the classic 500 card game. Built with TypeScript, featuring persistent game state, comprehensive rule references, and a beautiful responsive design.

๐Ÿš€ Live Demo | ๐Ÿ“– Documentation | ๐Ÿค Contributing


โœจ Features

๐ŸŽฎ Core Gameplay

  • โ™ ๏ธ Suit Selection - Visual emoji-based suit selection with enhanced visibility
  • ๐ŸŽฏ Smart Scoring - Automatic calculation based on official 500 rules
  • ๐Ÿ“Š Live Scoreboard - Real-time score tracking with win condition detection
  • โฑ๏ธ Round Timer - Track time spent on each round

๐Ÿ”„ Game Management

  • ๐Ÿ’พ Auto-Save - Persistent game state with localStorage
  • โ†ฉ๏ธ Undo/Redo - Full game history with action rollback
  • ๐Ÿ“ค Export/Import - Save and load complete game states
  • โœ๏ธ Round Editing - Modify any previous round with automatic recalculation

๐ŸŽจ Modern Design

  • ๐ŸŒ™ Dark Mode - Full light/dark theme support
  • ๐Ÿ“ฑ Mobile-First - Optimized layout and spacing for iPhone and mobile devices
  • ๐Ÿ’ป Responsive - Seamless experience across mobile, tablet, and desktop
  • ๐ŸŽญ Team Icons - Customizable team emojis and player names
  • โœจ Smooth Animations - Polished UI with micro-interactions

๐Ÿ“š Comprehensive Rules

  • ๐Ÿƒ Joker Rules - Complete joker gameplay mechanics
  • ๐Ÿ“ข Bidding Rules - Re-entering and bid modification guidelines
  • ๐ŸŽฒ Misรจre Rules - Special bid hierarchy and requirements
  • ๐Ÿ“‹ Scoring Reference - Interactive scoring table with all suit values

๐Ÿš€ Quick Start

Prerequisites

  • Node.js 16.0+
  • pnpm (recommended) or npm

Installation

# Clone the repository
git clone https://github.com/davestanyer/500score.git
cd 500score

# Install dependencies
pnpm install

# Start development server
pnpm dev

# Open http://localhost:5173

Build for Production

# Create optimized production build
pnpm build

# Preview production build locally
pnpm preview

๐ŸŽฏ Game Rules Quick Reference

๐ŸŽด Basic Scoring
Suit โ™ ๏ธ Spades โ™ฃ๏ธ Clubs โ™ฆ๏ธ Diamonds โ™ฅ๏ธ Hearts No-Trump
6 40 60 80 100 120
7 140 160 180 200 220
8 240 260 280 300 320
9 340 360 380 400 420
10 440 460 480 500 520

Special Bids:

  • Misรจre: 250 points (higher than 7, lower than 8)
  • Open Misรจre: 500 points
๐Ÿƒ Joker Rules

Trump Suit Contract:

  • Joker belongs to trump suit and becomes highest trump card
  • Must be played if necessary to follow suit

No Trump Contract:

  • Joker is a suit by itself but wins any trick
  • Cannot be played if you can follow suit
  • When leading joker, must specify suit for others to follow
๐Ÿ“ข Bidding Rules

Re-entering Bidding:

  • Can ALWAYS re-enter when someone changes suit
  • Can ALWAYS re-enter when someone increases bid
  • Normal bidding rules apply once re-entered

Changing Your Bid:

  • With competition: Change suit OR increase bid (once each)
  • Solo bidder: Can only increase, not change suit (once only)
  • Others get chance to re-enter after changes

๐Ÿ—๏ธ Architecture

Tech Stack

  • Frontend: React 18 + TypeScript
  • Styling: Tailwind CSS with custom design system
  • Build Tool: Vite
  • State Management: React Hooks + Context API
  • Storage: Browser localStorage with schema versioning
  • Icons: Lucide React + Custom emoji system

Project Structure

src/
โ”œโ”€โ”€ components/          # React components
โ”‚   โ”œโ”€โ”€ BidInput.tsx    # Bidding interface
โ”‚   โ”œโ”€โ”€ Scoreboard.tsx  # Score display
โ”‚   โ”œโ”€โ”€ RoundHistory.tsx # Game history
โ”‚   โ””โ”€โ”€ ...
โ”œโ”€โ”€ types/              # TypeScript definitions
โ”œโ”€โ”€ utils/              # Business logic & utilities
โ”œโ”€โ”€ constants/          # Game constants & configuration
โ””โ”€โ”€ App.tsx            # Main application component

Key Design Patterns

  • Component Composition: Modular, reusable components
  • Custom Hooks: Business logic separation
  • Type Safety: Comprehensive TypeScript coverage
  • Responsive Design: Mobile-first approach
  • Progressive Enhancement: Works without JavaScript for basic features

๐Ÿงช Development

Available Scripts

Command Description
pnpm dev Start development server
pnpm build Build for production
pnpm preview Preview production build
pnpm lint Run ESLint
pnpm typecheck Run TypeScript checks
pnpm format Format code with Prettier

Development Guidelines

๐Ÿ”ง Code Standards
  • TypeScript: Strict mode enabled, no any types
  • ESLint: Extended React and TypeScript rules
  • Prettier: Consistent code formatting
  • Naming: camelCase for variables, PascalCase for components
  • Commits: Conventional commit format
๐ŸŽจ UI Guidelines
  • Design System: Consistent color palette and spacing
  • Responsive: Mobile-first breakpoints
  • Accessibility: ARIA labels and keyboard navigation
  • Performance: Lazy loading and code splitting
  • Dark Mode: Full theme support

๐Ÿ›ฃ๏ธ Roadmap

โœ… Completed (v2.1)

  • Modern UI redesign with iOS-style aesthetics
  • Enhanced suit selection with emoji symbols
  • Comprehensive rule documentation
  • Dark mode support
  • Round editing functionality
  • Export/import game data
  • Undo/redo system
  • Round timer feature
  • Mobile-first optimization - Comprehensive responsive design overhaul
  • Compact layouts - Optimized spacing and button sizes for mobile devices
  • Touch-friendly interface - Improved button sizing and touch targets

๐Ÿšง In Progress

  • Enhanced error handling and validation
  • Performance optimizations (React.memo, useMemo)
  • Comprehensive test suite
  • Accessibility improvements (ARIA, keyboard nav)

๐Ÿ”ฎ Future Features

  • Multiplayer support with real-time sync
  • Advanced game statistics and analytics
  • Tournament mode with bracket management
  • Progressive Web App (PWA) capabilities
  • Cloud save synchronization
  • Customizable house rules

๐Ÿค Contributing

We welcome contributions! Please see our Contributing Guidelines for details.

Quick Contribution Guide

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Development Setup

# Fork and clone your fork
git clone https://github.com/YOUR_USERNAME/500score.git
cd 500score

# Install dependencies
pnpm install

# Create feature branch
git checkout -b feature/your-feature-name

# Start development server
pnpm dev

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


๐Ÿ‘ฅ Contributors

Dave Stanyer
Dave Stanyer
๐Ÿš€ Project Owner
Tom Carey
Tom Carey
๐Ÿ’ป Core Contributor
Claude AI
Claude AI
๐Ÿค– AI Assistant

๐Ÿ™ Acknowledgments

  • 500 Card Game Community for rules clarification and feedback
  • React Team for the amazing framework
  • Tailwind CSS for the utility-first styling approach
  • Vite Team for the lightning-fast build tool
  • All Contributors who have helped improve this project

๐Ÿ’ Support the Project

If you find this project helpful, please consider giving it a โญ๏ธ on GitHub!

Built with โค๏ธ by the 500Score Team

๐Ÿ” Back to Top

About

500 Score App

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •