https://github.com/sandre58/mygames
This repository contains a collection of classic board games implemented using WPF.
https://github.com/sandre58/mygames
chess connect4 games net80 wpf xaml
Last synced: about 1 month ago
JSON representation
This repository contains a collection of classic board games implemented using WPF.
- Host: GitHub
- URL: https://github.com/sandre58/mygames
- Owner: sandre58
- License: mit
- Created: 2024-05-07T07:59:47.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2025-09-12T08:54:27.000Z (9 months ago)
- Last Synced: 2025-09-12T10:32:12.450Z (9 months ago)
- Topics: chess, connect4, games, net80, wpf, xaml
- Language: C#
- Homepage:
- Size: 373 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
My Games
[![Downloads][downloads-shield]][downloads-url]
[![Forks][forks-shield]][forks-url]
[![Stargazers][stars-shield]][stars-url]
[![Issues][issues-shield]][issues-url]
[![MIT License][license-shield]][license-url]
A comprehensive collection of classic board games implemented in C# with .NET 10.
Features both console applications and rich WPF desktop interfaces with AI opponents,
customizable gameplay, and modern user experiences.
[![Language][language-shield]][language-url]
[![Build][build-shield]][build-url]
## ๐ฏ Overview
My Games is a modern implementation of classic board games built with .NET 10, offering multiple ways to play your favorite games. Each game includes:
- **Multiple Interfaces**: Console applications for quick play and WPF desktop apps for rich visual experiences
- **AI Opponents**: Sophisticated artificial intelligence with configurable difficulty levels
- **Customizable Gameplay**: Adjustable rules, board sizes, and game settings
- **Clean Architecture**: Well-structured, testable code with comprehensive unit test coverage
- **Cross-Platform Core**: Game logic built for portability and extensibility
## โจ Key Features
- **๐ฎ Multiple Game Modes**: Play against AI opponents or challenge friends in local multiplayer
- **๐ฅ๏ธ Dual Interfaces**: Choose between lightweight console apps or feature-rich WPF desktop applications
- **๐ค Advanced AI**: Alpha-beta pruning algorithms with multiple difficulty levels for challenging gameplay
- **โ๏ธ Highly Customizable**: Adjust board sizes, rules, difficulty settings, and visual themes
- **๐๏ธ Modern Architecture**: Clean, testable code structure with comprehensive unit test coverage
- **๐จ Rich UI**: Beautiful WPF interfaces with animations, themes, and intuitive drag-and-drop controls
## ๐ฒ Available Games
### โ๏ธ Chess
[![Framework][framework-shield]][framework-url]
[![Version][chess-version-shield]][chess-version-url]
**[๐ View Chess Documentation](src/Chess/README.md)**
A complete chess implementation featuring all standard rules including castling, en passant, and pawn promotion. Play against sophisticated AI opponents or challenge friends with both console and future WPF interfaces.
**Features:**
- Complete chess rule implementation
- AI with Alpha-beta pruning algorithm
- Console interface with algebraic notation
- Special moves: castling, en passant, promotion
- Comprehensive unit test coverage
### ๐ด Connect 4
[![Framework][framework-shield]][framework-url]
[![Version][connect4-version-shield]][connect4-version-url]
**[๐ View Connect4 Documentation](src/Connect4/README.md)**
The classic Connect 4 game with both console and beautiful WPF interfaces. Customize board dimensions, winning conditions, and enjoy smooth gameplay with multiple AI difficulty levels.
**Features:**
- Console and WPF desktop applications
- Customizable board sizes (4x4 to 12x10)
- Configurable win conditions (3-6 in a row)
- Drag-and-drop WPF interface with animations
- Theme support and visual customization
## ๐ Quick Start
### Prerequisites
- **.NET 10.0** or later
- **Visual Studio 2022** or compatible IDE
- **Windows OS** (for WPF applications)
### Installation
1. **Clone the repository:**
```bash
git clone https://github.com/sandre58/MyGames.git
cd MyGames
```
2. **Build the solution:**
```bash
dotnet build
```
3. **Run a game:**
**Chess Console:**
```bash
dotnet run --project src/Chess/MyGames.Chess.Console
```
**Connect4 Console:**
```bash
dotnet run --project src/Connect4/MyGames.Connect4.Console
```
**Connect4 WPF:**
```bash
dotnet run --project src/Connect4/MyGames.Connect4.Wpf
```
## ๐๏ธ Project Structure
```
MyGames/
โโโ src/
โ โโโ Chess/ # Chess game implementation
โ โ โโโ MyGames.Chess/ # Core chess library
โ โ โโโ MyGames.Chess.Console/ # Console application
โ โ โโโ README.md # Chess documentation
โ โโโ Connect4/ # Connect4 game implementation
โ โ โโโ MyGames.Connect4/ # Core Connect4 library
โ โ โโโ MyGames.Connect4.Console/ # Console application
โ โ โโโ MyGames.Connect4.Wpf/ # WPF desktop application
โ โ โโโ README.md # Connect4 documentation
โ โโโ Common/
โ โโโ MyGames.Core/ # Shared game framework
โโโ tests/ # Unit tests for all projects
โโโ assets/ # Game icons and images
โโโ build/ # Build configuration files
```
## ๐งช Testing
Run all tests across the solution:
```bash
dotnet test
```
Run tests for a specific game:
```bash
dotnet test tests/MyGames.Chess.UnitTests/
dotnet test tests/MyGames.Connect4.UnitTests/
```
## ๐ฎ Game Features Comparison
| Feature | Chess | Connect4 |
|---------|-------|----------|
| Console Interface | โ
| โ
|
| WPF Desktop App | ๐ (Planned) | โ
|
| AI Opponents | โ
| โ
|
| Customizable Rules | โ
| โ
|
| Board Customization | โ | โ
|
| Themes/Visual Options | โ | โ
|
| Drag & Drop UI | โ | โ
|
## ๐ค AI Implementation
Both games feature sophisticated AI opponents powered by:
- **Alpha-Beta Pruning**: Efficient minimax algorithm implementation
- **Position Evaluation**: Strategic position assessment functions
- **Configurable Difficulty**: Adjustable search depth from beginner to expert
- **Move Ordering**: Optimization techniques for better performance
## ๐ ๏ธ Development
### Building from Source
1. **Prerequisites**: Ensure you have .NET 10.0 SDK installed
2. **Clone**: `git clone https://github.com/sandre58/MyGames.git`
3. **Build**: `dotnet build` in the root directory
4. **Test**: `dotnet test` to run all unit tests
### Contributing
Contributions are welcome! Please see our [Contributing Guidelines](CONTRIBUTING.md) for details on:
- Code style and standards
- Adding new games or features
- Improving AI algorithms
- UI/UX enhancements
- Testing requirements
### Architecture
The project follows a clean architecture pattern:
- **Core Libraries**: Game logic and rules (platform-independent)
- **Console Applications**: Lightweight interfaces for quick gameplay
- **WPF Applications**: Rich desktop experiences with themes and animations
- **Shared Framework**: Common game abstractions and utilities
## ๐บ๏ธ Roadmap
### Near Term
- [ ] Chess WPF application with rich UI
- [ ] Online multiplayer support
- [ ] Game replay and analysis features
- [ ] Additional AI difficulty levels
### Future
- [ ] Mobile applications (MAUI)
- [ ] Additional classic games (Checkers, Reversi)
- [ ] Tournament and rating systems
- [ ] Advanced AI with machine learning
## ๐ Statistics
- **Languages**: C#, XAML
- **Framework**: .NET 10
- **Architecture**: Clean Architecture with MVVM (WPF)
- **Testing**: Unit tests with high coverage
- **Games**: 2 implemented, more planned
## ๐ค Contributing
We welcome contributions of all kinds:
- ๐ **Bug Reports**: Found an issue? Let us know!
- ๐ก **Feature Ideas**: Have suggestions for improvements?
- ๐ง **Code Contributions**: Submit pull requests for fixes or features
- ๐ **Documentation**: Help improve our documentation
- ๐จ **UI/UX**: Design improvements and theme contributions
## ๐ License
Copyright ยฉ Stรฉphane ANDRE.
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
## ๐ Acknowledgments
- Classic game rules and mechanics
- Algorithm implementations for AI opponents
- .NET community for frameworks and tools
- Contributors and testers
[language-shield]: https://img.shields.io/github/languages/top/sandre58/MyGames
[language-url]: https://github.com/sandre58/MyGames
[forks-shield]: https://img.shields.io/github/forks/sandre58/MyGames?style=for-the-badge
[forks-url]: https://github.com/sandre58/MyGames/network/members
[stars-shield]: https://img.shields.io/github/stars/sandre58/MyGames?style=for-the-badge
[stars-url]: https://github.com/sandre58/MyGames/stargazers
[issues-shield]: https://img.shields.io/github/issues/sandre58/MyGames?style=for-the-badge
[issues-url]: https://github.com/sandre58/MyGames/issues
[license-shield]: https://img.shields.io/github/license/sandre58/MyGames?style=for-the-badge
[license-url]: https://github.com/sandre58/MyGames/blob/main/LICENSE
[build-shield]: https://img.shields.io/github/actions/workflow/status/sandre58/MyGames/ci.yml?logo=github&label=CI
[build-url]: https://github.com/sandre58/MyGames/actions
[downloads-shield]: https://img.shields.io/github/downloads/sandre58/MyGames/total?style=for-the-badge
[downloads-url]: https://github.com/sandre58/MyGames/releases
[framework-shield]: https://img.shields.io/badge/.NET-10.0-purple
[framework-url]: https://dotnet.microsoft.com/download/dotnet/10.0
[connect4-version-shield]: https://img.shields.io/badge/version-1.0.0-blue
[connect4-version-url]: https://github.com/sandre58/MyGames/releases
[chess-version-shield]: https://img.shields.io/badge/version-1.0.0-blue
[chess-version-url]: https://github.com/sandre58/MyGames/releases