Skip to content
This repository was archived by the owner on Feb 8, 2026. It is now read-only.

matthallett1/ai-solitaire-game-collaboration

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🃏 Solitaire Game

A beautiful, fully-functional web-based Solitaire game with modern UI and comprehensive testing suite.

🎮 Features

  • Classic Solitaire Gameplay - All standard Klondike Solitaire rules
  • Beautiful Modern UI - Glassmorphism design with smooth animations
  • Drag & Drop - Intuitive card movement
  • Double-Click Auto-Move - Quick card placement to foundations
  • Auto-Move Button - Automatically move available cards to foundations
  • Score Tracking - Keep track of your score and moves
  • Explosion Effects - Fun visual feedback for invalid moves
  • Win Detection - Celebration when you complete the game

🚀 How to Play

  1. Open solitaire.html in any modern web browser
  2. Drag cards to move them between piles
  3. Double-click cards to automatically move them to foundations
  4. Click "Draw Card" to get cards from the stock pile
  5. Click "Auto Move" to automatically place available cards
  6. Click "New Game" to start fresh

Game Rules

  • Build tableau columns in descending order (King to Ace)
  • Alternate red and black cards in tableau
  • Build foundations in ascending order (Ace to King) by suit
  • Only Kings can be placed in empty tableau columns
  • Only Aces can start foundation piles

🧪 Testing Suite

An automated testing system is included to validate game logic and catch bugs.

Running Tests

  1. Open solitaire-test.html in your browser
  2. Choose a test mode:
    • Run Single Test - Test one game
    • Run 10 Tests - Quick validation
    • Run 100 Tests - Comprehensive testing
    • Stress Test - 1000 games for thorough validation

What Gets Tested

  • ✅ Deck integrity (52 unique cards)
  • ✅ Proper card dealing
  • ✅ Move validation
  • ✅ Card state management
  • ✅ Auto-flip mechanics
  • ✅ Waste pile operations
  • ✅ Duplicate prevention
  • ✅ Card count consistency

📁 Files

  • solitaire.html - Main game file
  • solitaire-test.html - Automated testing suite
  • BUG_FIXES.md - Documentation of bug fixes and improvements
  • README.md - This file

🛠️ Technical Details

  • Pure HTML/CSS/JavaScript - No dependencies required
  • No build process - Just open and play
  • Responsive design - Works on different screen sizes
  • Modern browser features - Drag & Drop API, CSS animations

🐛 Bug Fixes

See BUG_FIXES.md for detailed information about bugs that were fixed and the testing improvements made.

📝 Recent Updates

  • Fixed duplicate cards appearing in waste pile
  • Fixed cards not flipping after auto-move
  • Enhanced testing suite with 10 comprehensive tests
  • Added waste pile support to auto-move
  • Improved visual feedback and UI polish

🎯 Future Enhancements

Potential features to add:

  • Timer and statistics
  • Undo/Redo functionality
  • Hint system
  • Different difficulty levels
  • Sound effects
  • Dark/light theme toggle
  • Mobile touch optimization

📄 License

Free to use and modify for personal and educational purposes.

🙏 Contributing

Feel free to fork, modify, and submit pull requests for improvements!


Enjoy the game! 🎉

About

Collaborative web-based Solitaire game with testing suite

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages