Skip to content

This project provides a dual experience of Connect Four: a classic terminal-based version and an interactive graphical version using the pygame library.

Notifications You must be signed in to change notification settings

soham2002/Connect4

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

Connect4 Game Project

Welcome to the Connect4 Game project! This project includes two files - connect4.py and Connect4GUI.py - providing both a simple terminal-based version and a graphical user interface (GUI) version of the classic Connect Four game.

connect4.py

Description

connect4.py is a simple implementation of Connect Four in the terminal. The game board is represented as a 6x7 matrix, where Player 1 is represented by the token '1', and Player 2 is represented by the token '2'. Players take turns to drop their tokens into columns, aiming to connect four of their tokens either horizontally, vertically, or diagonally.

How to Play

  1. Run the script: python connect4.py
  2. Enter the column number where you want to drop your token.
  3. Alternate turns between Player 1 and Player 2.
  4. The first player to connect four tokens in a row wins!

Connect4GUI.py

Description

Connect4GUI.py is a graphical version of Connect Four implemented using the pygame library. This version features a visual dialog box where Player 1 plays with Red Tokens, and Player 2 plays with Yellow Tokens. The GUI enhances the gaming experience with a more interactive and visually appealing interface.

How to Play

  1. Run the script: python Connect4GUI.py
  2. Click on the column where you want to drop your token.
  3. Players take turns clicking, and the game continues until there's a winner or a draw.
  4. Enjoy the graphical representation of the classic Connect Four game.

Requirements

  • Python 3.x
  • Pygame library (install using pip install pygame)

Feel free to explore and modify the code to enhance the game or add new features. Happy gaming!

About

This project provides a dual experience of Connect Four: a classic terminal-based version and an interactive graphical version using the pygame library.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published