Skip to content

basic-tutorials/Connect_Four

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Connect Four

Welcome to Connect Four! This is a command-line implementation of the classic Connect Four game written in Ruby.

About the Game

Connect Four is a two-player game where the players take turns dropping colored discs into a grid. The goal is to be the first to connect four of one's own discs horizontally, vertically, or diagonally. The game ends either when one player achieves four in a row, or when the grid is full and no player has achieved four in a row.

Features

  • Two players can play against each other.
  • The game is played on a 6x7 grid.
  • Players take turns dropping their discs into the grid.
  • The game checks for a winner after each move.
  • The game ends when a player wins or when the grid is full.

How to Play

  1. Clone this repository to your local machine.

    git clone https://github.com/Ismat-Samadov/Connect_Four.git
    
  2. Navigate to the project directory.

    cd Connect_Four
    
  3. Run the game.

    ruby connect_four.rb
    
  4. Follow the on-screen instructions to play the game. Players take turns entering the column where they want to drop their disc.

  5. Enjoy the game and have fun!

Future Enhancements

  • Implement an AI opponent for single-player mode.
  • Add a graphical user interface (GUI) for a more interactive experience.
  • Allow customization of grid size and winning conditions.

Contributions

Contributions are welcome! If you have any ideas for improvements or new features, feel free to open an issue or submit a pull request.

About

Odin Project: Connect Four

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages