A modern implementation of the classic Solitaire (Klondike) card game built with Svelte, TypeScript, and TailwindCSS. This project features a clean design with smooth animations, drag-and-drop gameplay, and a complete scoring system.
- 🎮 Classic Solitaire gameplay
- 🎯 Complete scoring system
- ⏱️ Game timer
- 🔄 Undo/Redo functionality
- 🖱️ Drag-and-drop card movement
- 💫 Smooth animations
- 🎨 Modern UI with TailwindCSS
This project is built using Deno with Vite and Svelte. While the application will run with Node.js, Deno is required for running tests.
Required:
- Deno 2.0.0 or higher
- Node.js 18 or higher
- npm, pnpm, or yarn package manager
Optional:
- VS Code with Deno extension for the best development experience
- Clone the repository:
git clone https://gitlab.com/hamidriaz1999/csc200m24pid10.git
cd solitaire- Install dependencies:
deno install
deno install --allow-scripts=npm:svelte-preprocess@5.1.4
# or
npm install
# or
pnpm install- Start the development server:
deno task dev
# or
npm run dev
# or
pnpm dev- Open your browser and navigate to
http://localhost:5173
To create a production build:
deno task build
# or
npm run build
# or
pnpm buildThe goal is to move all cards to the foundation piles, building up each suit from Ace to King.
- Moving cards from waste to foundation: +10 points
- Moving cards from waste to tableau: +5 points
- Moving cards from tableau to foundation: +10 points
- Turning over a tableau card: +5 points
- Moving cards from foundation to tableau: -15 points
- Recycling the waste pile: -100 points
- Frontend Framework: Svelte
- Language: TypeScript
- Styling: TailwindCSS
- Build Tool: Vite
- Testing: Deno Test
solitaire/
├── src/
│ ├── components/ # Svelte components
│ ├── gameLogic/ # Game logic classes
│ ├── shared/ # Shared states
│ ├── DataStructures/ # Custom data structures
│ └── tests/ # Test files
├── public/ # Static assets
└── ...config files
Tests are written using Deno's built-in test framework. Make sure you have Deno installed before running tests.
The project includes comprehensive tests for the game logic and data structures. To run the tests:
deno test- Svelte
- TypeScript
- TailwindCSS
- Deno or Node
- Vite
- PostCSS
- Autoprefixer
-
Make the design responsive for mobile devices
-
Migrate to Svelte 5
-
Additional features
- Add hints
- Save game state to localStorage
- Implement high score system
