◀ VibeCruiser

c4

A free connect four game — play it in your browser, no install. 🔴🔵 Connect Four game in JS + Canvas. 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…

by @kenrick95 · kenrick95/c4 on GitHubLANG TypeScript★ 281HOSTED ON KENRICK95.GITHUB.IOUPDATED 23 Sep 2026

Vote and save it — continue with GitHub or sign in free

Made this, @kenrick95? See how many people played it → or use email

▶ Play full screen ▲ Vote with GitHub ▲ Vote with email

GitHub asks to share your profile and email with us. We never post anything.

Open the live demo Source on GitHub

From the README

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.

Connect four of your game pieces vertically, horizontally, or diagonally before the other player do so.

At each turn, player will drop a game piece in one of the seven columns by clicking on the chosen column.

Read Wikipedia page on Connect Four

Should be good in latest Firefox, Edge, Chrome, and Safari.

Read the full README on GitHub →

Built something like this? Submit your vibe — free account, takes a minute. How listing works.

More like this

More connect four games →

Made this?

Claim it: create a free account, then press CLAIM THIS in the cruiser. Put the badge below in your README or on your demo page first; that link is how we know it's yours.

Your project is on the cruise, loaded live from your own site. Put the badge in your README or on the demo page: it shows your live play count, it links back to this page, and everyone who lands here is one click from running the real thing.

On VibeCruiser

How listing, the badge and claiming work →