This project implements the classic game of Connect 4 using the Alpha-Beta pruning algorithm to optimize the decision-making process of the AI player. The game is played on a 7x6 grid where two players take turns dropping colored discs into a column, aiming to connect four of their discs in a row either horizontally, vertically, or diagonally.
Example of board state:
| | | | | |
----------------------------
| | | | | |
----------------------------
| | | R | | |
----------------------------
| | R | Y | | |
----------------------------
| R | Y | Y | Y | |
----------------------------
R | Y | R | R | Y | |
R = Red player
Y = Yellow player
R wins
Main class: appli/Connect4Game.java
dangerValue method in Situation.java (you can also change data in DangerPattern.java))