Skip to content

This repo contains the code for Connect4, a two-player game built with JavaScript, HTML, and CSS. Players take turns dropping pieces into a grid, aiming to get four in a row horizontally, vertically, or diagonally.

Notifications You must be signed in to change notification settings

chedelino/Connect4Game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

6 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŽฎ Connect Four Game Repository

Welcome to the Connect Four Game repository! Enjoy this fun, interactive project where the classic Connect Four game meets modern web technologies. Whether youโ€™re a developer looking to learn or a casual player wanting a quick game, this project has something for everyone.

image

๐ŸŒŸ Features:

๐ŸŽฒ Two-Player Mode: Challenge a friend in a battle of strategy and wit.

โœจ Interactive Gameplay: Drop discs with a simple click and enjoy smooth animations as the game unfolds.

๐Ÿง  Win Detection: Automatic checks for horizontal, vertical, and diagonal victories, ensuring fair play.


๐Ÿ“‚ Project Highlights:

  1. Game Logic Implementation: A robust JavaScript-powered backend ensures accurate gameplay with efficient win detection and draw recognition.

  2. Dynamic UI: Eye-catching CSS styles and responsive design principles make the game visually appealing and functional on any device.


๐Ÿ› ๏ธ Getting Started:

  1. Clone the Repository:

    git clone https://github.com/chedelino/connect4Game.git
  2. Open the Project: Navigate to the directory and open fichier.html in your browser:

    cd connect4Game
    open fichier.html
  3. Start Playing! Enjoy a quick game or explore the source code to see how everything works.


๐Ÿ“ Repository Structure:

connect4Game/
โ”œโ”€โ”€ fichier.html        # Main game interface
โ”œโ”€โ”€ style.css         # Styling for the game board and UI
โ”œโ”€โ”€ fichier.js         # Core game logic and interactivity
โ””โ”€โ”€ README.md         # Project documentation (you are here!)

๐Ÿ’ก How to Play:

  1. Select a column to drop your disc by clicking on it.
  2. Players alternate turns, aiming to connect four discs in a row.
  3. The game announces the winner or a draw when the board is full.
  4. After the game ends, you will be asked if you want to continue:
    • Yes: The game restarts.
    • No: A report is displayed showing the total number of wins for each player.

๐ŸŒŸ Future Enhancements:

  • ๐Ÿค– AI Opponent: Play against a computer with varying difficulty levels.
  • ๐ŸŒ Online Multiplayer: Challenge friends across the globe.
  • ๐ŸŽถ Sound Effects: Add immersive soundscapes to enhance gameplay.

๐ŸŽ‰ Enjoy Playing!

Whether you're here to play, learn, or contribute, we hope you have a fantastic experience. Feel free to reach out with questions, suggestions, or just to say hello!

About

This repo contains the code for Connect4, a two-player game built with JavaScript, HTML, and CSS. Players take turns dropping pieces into a grid, aiming to get four in a row horizontally, vertically, or diagonally.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published