02-10-2024, 09:50 AM
(This post was last modified: 03-29-2024, 11:46 PM by a740g.
Edit Reason: Fixed a few bugs
)
This is an implementation of the classic Connect 4 game as a library. The core game engine is implemented as a library that can be easily plugged into any kind of front-end. The engine also includes a Negamax solver that can be used either to implement an AI player or give hints to the players.
There are two front-end included. One is a fancy (?) InForm-PE GUI based one (FourUp.bas) and another console version commented inside FourUpEngine.bas.
![[Image: screenshot.png]](https://i.ibb.co/4g4Cr7C/screenshot.png)
The game engine is in the FourUpEngine.bas and FourUpEngine.bi files. The engine code does not include any graphics rendering, input management, sound etc.
![[Image: Screenshot-2024-02-10-145804.png]](https://i.ibb.co/6RFDZSN/Screenshot-2024-02-10-145804.png)
Try the game with the search depth of 6 or above. Anything more than 12 may be painfully slow. I'll make more optimizations later.
The zip file below has the frontend, library and all dependencies.
Find the latest version on GitHub.
Cheers!
There are two front-end included. One is a fancy (?) InForm-PE GUI based one (FourUp.bas) and another console version commented inside FourUpEngine.bas.
![[Image: screenshot.png]](https://i.ibb.co/4g4Cr7C/screenshot.png)
The game engine is in the FourUpEngine.bas and FourUpEngine.bi files. The engine code does not include any graphics rendering, input management, sound etc.
![[Image: Screenshot-2024-02-10-145804.png]](https://i.ibb.co/6RFDZSN/Screenshot-2024-02-10-145804.png)
Try the game with the search depth of 6 or above. Anything more than 12 may be painfully slow. I'll make more optimizations later.
The zip file below has the frontend, library and all dependencies.
Find the latest version on GitHub.
Cheers!