An open API service indexing awesome lists of open source software.

https://github.com/thesaltree/connect4


https://github.com/thesaltree/connect4

Last synced: 3 months ago
JSON representation

Awesome Lists containing this project

README

        

# Connect 4 Game

## Introduction

This Connect 4 game is a web-based implementation in React Native. It offers a classic gaming experience where players take turns dropping colored discs into a grid with the goal of connecting four of their own discs vertically, horizontally, or diagonally.

## Features

- **Two-player mode:** Play against a friend on the same device.
- **Single-player mode:** Challenge an AI opponent.

1. **Setup:**
- Clone the repository and run `npm run web`
- Choose mobile mode from your browsers developers tools
- Choose the desired game mode (2 players or 1 player vs. AI).

2. **Gameplay:**
- Click on a column to drop your disc into it.
- The disc will fall to the lowest available position within the column.
- The game alternates between players until a winner is determined or the board is filled.

3. **Winning:**
- Connect four discs of the same color vertically, horizontally, or diagonally to win.
- If the board fills up without a winner, the game ends in a draw.

## Contributions

Contributions to this project are welcome. If you have suggestions for improvements or would like to report a bug, please open an issue or submit a pull request on GitHub.

## License

This Connect 4 game is licensed under the [MIT License](LICENSE). You are free to use, modify, and distribute the game for personal and non-commercial purposes.