Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/gervinfung/connect4

A Connect-4 Game written in C# WinForms. This program was written to familiarize myself with C# syntax since C# is very similar to Java.
https://github.com/gervinfung/connect4

Last synced: 12 days ago
JSON representation

A Connect-4 Game written in C# WinForms. This program was written to familiarize myself with C# syntax since C# is very similar to Java.

Awesome Lists containing this project

README

        

## About
- A simple Connect 4 AI that implemented minimax & alpha-beta pruning & move-ordering to fully optimise the AI
- The Board for backend and frontend are represented in 1D Immutable List to optimise the code as most Connect4 board state are done with 2D array/list
- I wrote this game as I have always wanted to do some simple project in C#, and I figured that doing Connect4 would be a great start as it allows me to learn WinForms and Data Structure of C#

## Folder Structure

The workspace contains two folders by default, where:

- `engine`: the folder that contains the backend logic of the game
- `gui`: the folder that contains the user interface of the game
- `bin/Debug/net5.0-windows`: the folder that contains executable file

## To play the Game

No. | Steps
--- | ----
1.| User can choose to play as Red/Black
2.| User can choose Red/Black as AI
3.| Or, user can watch AI play against itself

## Game Features

No. | Features
--- | ----
1.| Restart new game
2.| Exit game
3.| Highlight turn
4.| Choose AI level from 1 to 5

**Game Screen**
![Chess sample](Connect4Game/connect4.jpg)

**EXE file**
[Connect4Game](Connect4Game/bin/Debug/net5.0-windows/Connect4Game.exe)

**dll file**
[Connect4Game](Connect4Game/bin/Debug/net5.0-windows/Connect4Game.dll)