Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kenrick95/c4
🔴🔵 Connect Four game in JS + Canvas
https://github.com/kenrick95/c4
connect-four game-2d html5-canvas html5-game typescript-game web-game
Last synced: 7 days ago
JSON representation
🔴🔵 Connect Four game in JS + Canvas
- Host: GitHub
- URL: https://github.com/kenrick95/c4
- Owner: kenrick95
- License: mit
- Created: 2013-12-27T04:53:23.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2024-09-24T05:39:45.000Z (about 2 months ago)
- Last Synced: 2024-10-30T09:04:58.897Z (9 days ago)
- Topics: connect-four, game-2d, html5-canvas, html5-game, typescript-game, web-game
- Language: TypeScript
- Homepage: https://kenrick95.github.io/c4/
- Size: 8.9 MB
- Stars: 249
- Watchers: 8
- Forks: 92
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-open-source-games - c4 - Connect Four game where player is playing against an AI. (Browser-Based / Boardgame)
README
# c4
![Test](https://github.com/kenrick95/c4/workflows/Test/badge.svg) ![Deploy](https://github.com/kenrick95/c4/workflows/Deploy/badge.svg)
**c4**, stands for **Connect Four**, is a browser game written in TypeScript and utilizes HTML's `canvas`. Player is playing against an AI that uses Minimax algorithm and alpha-beta pruning. The evaluation function is hard-coded, and hence the AI may not be moving using the most optimal move.
## Play
- [kenrick95.github.io/c4](https://kenrick95.github.io/c4/)
## Gameplay
![Screenshot 2024-03-07 202120](https://github.com/kenrick95/c4/assets/3090380/6cc9e901-83d8-4daf-b535-8cab72a56a4e)
### Objective
_Connect four_ of your game pieces vertically, horizontally, or diagonally before the other player do so.
### How to move?
At each turn, player will drop a game piece in one of the seven columns by clicking on the chosen column.
### More info
Read [Wikipedia page on Connect Four](https://en.wikipedia.org/wiki/Connect_Four)
## Browser compatibility
Should be good in latest Firefox, Edge, Chrome, and Safari.
## Contributing
Contributions are welcome! I'm happy to accept any kind of contributions, pull requests, or bug reports.
### Developing
1. Fork and clone this repository
2. Install dependencies```
yarn install
```3. Start local development server
```
yarn start
```4. Make your changes at either `browser/`, `core/`, or `server/`
5. Test it out at http://localhost:5173/
6. After you are happy with your changes, please submit your Pull Request!## License
This work is licensed under MIT License.