Welcome to ChessLiteServerAPI, an advanced chess server built with ASP.NET Core to showcase technical mastery and modern web design. This project emphasizes the implementation of chess logic for a custom game variant, backend efficiency using ADO.NET and Entity Framework, and a responsive web experience.
🎥 Watch the Demo Video: https://www.youtube.com/watch?v=QPXw-yA3WaY
(Click the thumbnail to watch the video.)
This chess variant, called "חצי שח" (Half Chess), provides an exciting twist:
- Board: 8 rows × 4 columns (half the width of a regular chessboard)
- Pieces: Each side has a King, Bishop, Knight, Rook, and pawns aligned with these pieces.
- Rules Modifications:
- Pawns can move horizontally one square (but cannot capture in this movement).
- Players must complete their moves within a limited time; otherwise, they forfeit the game.
- En passant, castling, and promotions are supported and tracked.
- Play against the server: The server evaluates valid moves and responds dynamically to the user.
- Custom logic for castling, pawn promotions, en passant, and special pawn movements.
- Moves tracking: Save all game steps to the database with undo/redo support.
- ADO.NET: For direct and efficient data access with low-level queries.
- Entity Framework Core: For ORM operations, managing relationships (e.g., Games, Users, GameSteps).
- Parallel Processing: Handles long-running tasks asynchronously using a custom
TaskManagerto prevent blocking requests.
- Razor Pages with CSS and JS for a premium and responsive interface.
- Bootstrap-powered layouts: Mobile-friendly views with dynamic game tables, player stats, and collapsible menus.
- Custom CSS styling: Icons for actions like 🏰 castling and ♙ promotions.
- AJAX-based player tracking: Fetch games dynamically without reloading the page.
- Game tracking: Every move is saved to the database, with:
- 🏰 Castling moves (tracked and validated).
- 📈 Pawn promotions to Knight, Bishop, or Rook.
- ➡️ En passant captures.
- Chess rules compliance: Ensures all standard rules with custom logic for stalemates and checkmates.
- Board initialization: Supports multiple predefined setups.
- SQL Server integration with Entity Framework and ADO.NET.
- Entities:
- Users: Stores player info (name, phone, country).
- Games: Stores game metadata (player ID, winner, win method).
- GameSteps: Tracks every move during the game.
-
Play a Move
POST/api/chess/move- Validates and executes the move.
- Handles
PawnPromotion,EnPassant,Castling, andCheckmate.
-
Track Game Steps
POST/api/chess/store-steps- Stores multiple moves asynchronously with a Task Manager.
-
Retrieve Games by Player
GET/api/games?player={playerName}- Fetches all games played by the user.
-
Print the Chessboard
POST/api/chess/print-board- Prints the current board state with Unicode symbols.
- TaskManager: Centralized background task management for non-blocking operations.
- Parallel ForEach: Uses parallel loops to improve board evaluation performance.
-
Dynamic Game Tables
- View players, games, and steps with collapsible lists.
- Color-coded moves: Differentiates between white and black moves.
-
Real-time Game Tracking
- Interactive dropdowns for filtering players and displaying their games.
- Animated buttons: Stylish red buttons for viewing game steps.
-
Custom Icons for Actions
- Unicode chess piece symbols: ♔ King, ♘ Knight, ♖ Rook, ♙ Pawn.
- Special icons:
- En passant: ♙→♙
- Castling: ♖↔♔
- Promotion: promoted to ♖ (Pawn promoted to Rook)
- ASP.NET Core: Backend web API development.
- Razor Pages: UI with Bootstrap integration.
- SQL Server: Database management with Entity Framework and ADO.NET.
- TaskManager: Custom background task management.
- CSS & JS: Modern frontend components.
- Clone the repository and navigate to the project folder.
- Run the application via Visual Studio or the command line.
- Open your browser and go to:
https://localhost:8000
Built with ❤️ by Aviad Korakin
📧 aviad825@gmail.com
This project demonstrates technical prowess in backend development, parallel programming, and web design. It showcases how an engaging chess game can be built with ASP.NET Core, ensuring scalable performance and exceptional user experience. 🎉
This version includes the promotion icon to enhance clarity and visualization of the pawn promotion feature. Let me know if you need further adjustments!
