An open API service indexing awesome lists of open source software.

https://github.com/yosibs/connectfour-dotnet-courseproject

This repository contains both the Client (WinForms application) and the Server (ASP.NET Core with Razor Pages & Web API) for a Connect Four game project. This project was developed as part of a Software Engineering C# course project and demonstrates full-stack development in .NET, combining desktop, web, and database technologies.
https://github.com/yosibs/connectfour-dotnet-courseproject

ado-net aspnet-core connect-four csharp dotnet entity-framework fullstack game-development razor-pages sql-server webapi winforms

Last synced: 5 months ago
JSON representation

This repository contains both the Client (WinForms application) and the Server (ASP.NET Core with Razor Pages & Web API) for a Connect Four game project. This project was developed as part of a Software Engineering C# course project and demonstrates full-stack development in .NET, combining desktop, web, and database technologies.

Awesome Lists containing this project

README

          

# 🎮 Connect Four – Client & Server Project

ConnectFourIcon

---


pic5 Overview


This project is an academic implementation of the classic **Connect Four** game with a **Client–Server architecture**.

- **Client (WinForms)**: Provides a modern UI for playing Connect Four against the computer (server). Includes animations, replay functionality, and a Discord-inspired design theme.
- **Server (ASP.NET Core)**: Manages the game logic, player registration, database, and queries. Supports multiple clients playing independently in parallel.

The project demonstrates **full-stack development** in C#, combining a desktop application, ASP.NET Core Web App (Razor Pages), and ASP.NET Core Web API, along with SQL Server for persistent data storage.

---

## 📸 Screenshots

- Login Screen (Client)
LoginForm

- Game Board (Client)
Game

- Replay List (Client)
ReplayForm

- Replay Display (Client)
ReplayDisplay

- Razor Pages - Home Screen (Server Dashboard)
HomeScreen

- Razor Pages - ScoreBoard (Server Dashboard)
PlayersData

---


pic5 Features

- 🔹 Play **Connect Four** against the server.
- 🔹 Player registration with validation (name, ID, phone, country).
- 🔹 **Stylish WinForms Client** with Discord theme and animations.
- 🔹 **Replay functionality** for past games saved locally.
- 🔹 **Server Web Interface** (Razor Pages) for:
- Registering players
- Running queries
- Viewing statistics & player information
- Managing updates and deletions
- 🔹 **REST API** (ASP.NET Core Web API) for client–server communication.
- 🔹 **SQL Server Database**:
- Stores players, games, and moves
- Supports queries like:
- All players (ordered case-sensitive)
- All games with details
- Distinct games without duplicates
- Player statistics per country
- Player participation counts

---


pic5 Technologies Used

- **C# .NET**
- **WinForms** (Client UI)
- **ASP.NET Core Razor Pages** (Server web app)
- **ASP.NET Core Web API** (Server API)
- **SQL Server LocalDB** (ADO.NET / Entity Framework)
- **LINQ** for queries
- **Bootstrap** (styling Razor pages)

---

## 🏗 Architecture

```mermaid
flowchart LR
subgraph Client[🎮 Client - WinForms App]
UI[UI - Game Board & Controls]
Replay[Replay Saved Games]
end

subgraph Server[🖥 Server - ASP.NET Core]
Razor[Razor Pages - Web UI]
API[Web API - REST Endpoints]
end

subgraph Database[🗄 SQL Server LocalDB]
Players[(Players Table)]
Games[(Games Table)]
Moves[(Moves Table)]
end

UI -->|HTTP Requests| API
Replay -->|Local Saved Games| UI
Razor --> Database
API --> Database
```


pic5 Authors

---


pic5 References

- [Connect Four inspiration game](https://www.cbc.ca/kids/games/all/connect-4)
- [ASP.NET Core Razor Pages Documentation](https://learn.microsoft.com/en-us/aspnet/core/tutorials/razor-pages/page)
- [ASP.NET Core Web API Documentation](https://learn.microsoft.com/en-us/aspnet/web-api/overview/advanced/calling-a-web-api-from-a-net-client)
- [Bootstrap Grid System](https://getbootstrap.com/docs/5.0/layout/grid/)

---

pic5