Connect Four Game

Connect Four (also known as Connect 4, Four Up, Plot Four, Find Four, Captain's Mistress, Four in a Row, Drop Four, and Gravitrips in the Soviet Union) is a game in which the players choose a color and then take turns dropping colored tokens into a six-row, seven-column vertically suspended grid. The pieces fall straight down, occupying the lowest available space within the column. The objective of the game is to be the first to form a horizontal, vertical, or diagonal line of four of one's own tokens. It is therefore a type of M,n,k-game (7, 6, 4) with restricted piece placement. Connect Four is a solved game. The first player can always win by playing the right moves.

Connect Four is a game that requires strategic thinking and planning, as players must anticipate their opponent's moves while also working to create their own winning connections. The simple rules and quick gameplay make it a popular choice for casual gaming.

connect four game app image

Tech Stack

  • Java
  • Java OOP
  • JavaFX
  • Geometry

Project Learnings

  • Optimised search performance using debouncing.
  • Enhanced user experience with frontend infinite loader using IntersectionObserver.
  • Using Cloudinary to store and fetch images.
  • Discovering TailwindCSS features and utility classes.

Project Challenges

  • For the Solving four connect edges problem in four-connect game build algorithm.
  • Adding user for which player have now fill the box.
  • Using JavaFX build animation scolling view the box drop in the box.