A classic game, written in Flutter. The main goal of this project was implementation of the minimax algorithm and alphabeta pruning. Side goals were building the app using specific packages: flutter_hooks, hooks_riverpod and to deploy the app on the web in the end.
Web app is hosted here.
connect4.mp4
Multiple game modes:
- Player VS Player
- Player VS AI
Testing env for compering multiple algorithms:
- random
- minimax
- minimax with alphabeta pruning
First thing first, you will need Flutter SDK installed on you machine. If you haven't done that yet, you should head here first and follow the instructions. Note: If you want to build and run for web, at the time of writting, you will need to switch to beta channel of SDK!
For running the app you need to have at lease one connected device (Andoid phone/emulator, iOS device/simulator or a webserver). Available devices can we listed with:
flutter devicesAfter that you can run the app with (optional flag: --release - run production build):
flutter runTo make build silmply run next command (where platform is one of: apk/ios/web):
flutter build platform --release