Connect Four rebuild deck
EASY
Nothing here is hard; the only bug worth naming is the diagonal win check walking off the array in a corner, and that is a bounds test you write once.
You will get essentially the whole thing.
Two things separate a build worth keeping from one you close after a single game. The first is the drop animation, because instant placement makes the whole thing feel like a spreadsheet with colours. The second is the diagonal win check, which is exactly where off-by-one errors hide, usually at the board edges where nobody thinks to test. Before you trust it, deliberately play a game you win with a diagonal terminating in a corner.
- Difficulty
- EASY · 1 of 5
- First playable
- An evening
- The original
- 2 team-years
- Released
- 1974 · Classic
- Genre
- Connection Game
Build a seven-column, six-row gravity-drop connection game as a single self-contained HTML file. Canvas 2D or DOM, either is fine. No build step, no dependencies. Requirements: - Click or hover a column to drop a disc; it lands in the lowest empty row of that column. Track a per-column height counter rather than rescanning the grid on every move. - The load-bearing detail: check for a win only from the disc just placed, and do it by counting outward in both directions along each of the four axes (horizontal, vertical, and both diagonals). Count matching discs one way, then the other, add one for the placed disc, test for four or more. A whole-board scan is slower and, more importantly, agents almost always write the diagonal case so it walks off the edge of the array. Bound every step by the row and column limits explicitly. - Drop animation: gravity of 2400 px per second squared with a single bounce at 18% of impact velocity, roughly 400 ms to the bottom row. Block input until the disc settles. - Computer opponent using negamax to depth 6 with alpha-beta, scoring every four-cell window plus a centre-column bonus. It must always take an immediate win and always block mine. - Board dimensions, colours and search depth in a JSON config block. - Highlight the four winning discs and dim everything else. Definition of done: the computer blocks my open three every single time, and a diagonal win ending in the top-right corner is detected without an index error.
- The Milton Bradley trademark and that particular blue plastic frame with the yellow legs
- The clatter of the discs and the release lever that dumps the whole board out, which is the best part of the product
- A solved-game opening book, unless you are prepared to ship a few hundred megabytes of endgame database
Scan outward from the last move only
The only cells whose status can possibly have changed are the ones touching the move just played, so a full-board scan is slower and, far worse, it is where the diagonal off-by-one hides at the edges nobody tests. Write the outward scan once and it hands you threat detection for free, which is the thing that makes an opponent feel like it is paying attention.
ScopeAn evening— build just this, not the game
Build a line-detection module with a visualiser as a single self-contained HTML file. DOM or Canvas 2D, no build step. - A 7x6 grid filled by clicking columns, alternating two colours, tracking a per-column height counter rather than rescanning. - After each placement, scan outward FROM THAT CELL ONLY, in both directions along all four axes: horizontal, vertical, and both diagonals. Count matching cells one way, then the other, add one for the placed cell, test for four or more. Bound every step against the row and column limits explicitly. Diagonals walking off the array is the exact bug this exists to prevent. - The same scan produces threats: any run of three with a playable empty cell at either end. After every move, list all open threats for both colours with their cells. - Draw the eight scan rays from the last placed cell and highlight detected threats. - An edge-torture button that fills the board so the next move is a diagonal win ending in a corner. Definition of done: the corner diagonal registers with no index error, and my open three appears in the threat list the instant I create it.
Not a clone — Connect Four re-themed and cut down to something you can finish. The angle is the important reel: it is what turns a project into a weekend. 24,360 ways to land.
One Last Job One Run
Connect Four, but a roguelike run instead of a campaign, set in a heist crew. Rendered in modern low-poly diorama.
Build a browser game called "One Last Job One Run". The pitch in one line: a connection game in the spirit of Connect Four, but a roguelike run instead of a campaign, set in a heist crew. WHAT THIS IS Take the SHAPE of Connect Four — its core loop, and whatever makes that loop good — and rebuild it as your own game in a different world at a smaller scope. Use your own names, art and audio, which you want anyway: a reskin of somebody else's game is less interesting than a new one that works the same way. THE ANGLE — this is the important constraint, honour it above everything else A roguelike run instead of a campaign. Twenty to forty minutes, procedurally assembled from hand-authored chunks, permadeath, and a meta-progression drip. Replaces authored content volume with combinatorics. This is what makes the project finishable. If a decision would push the scope back towards the original's, take the smaller option every time. THE THEME A heist crew. Roles, timing and a plan that only works if everyone hits their mark. Betrayal is always on the table. The theme is not a coat of paint. Let it change what the mechanics mean — a reload, a health pack and a locked door should all be things that make sense in this world and nowhere else. LOOK Modern low-poly diorama. Facetted meshes, baked AO, miniature tilt-shift feel, and a colour script of 5–6 base hues max. REQUIREMENTS - Runs in a browser with no build step. Canvas 2D unless the angle genuinely requires 3D, in which case three.js. - Fixed-timestep update loop with interpolated rendering, so it behaves the same at 60Hz and 144Hz. - Every tuning constant in one CONFIG object at the top, exposed as live sliders in a debug panel. You will find the feel by dragging those, not by prompting. - All content — levels, entities, balance numbers — in JSON or plain data files, never inline in the logic. - Audio generated with the Web Audio API rather than asset files. - Respect prefers-reduced-motion: keep the fades, drop the shake and the parallax. BUILD ORDER 1. The core loop with placeholder rectangles, at the reduced scope the angle demands. No theme, no art, no audio. Make it fun as rectangles first. 2. The angle's consequences. Cutting to bots, or to turn-based, or to one level changes the design rather than just shrinking it — find out how and rewrite step 1. 3. The theme, as content and data. 4. The look, applied last as a rendering layer over a game that already works. Start by writing a one-page plan: the core loop, what the angle removes and what that frees you to do properly, and what you are deliberately leaving out. Wait for me to approve it before writing code.
Half the time one of these already does what you wanted, and the other half it saves you a week of solving a problem someone documented in 1997.
One count per game. No account — it is tied to a salted hash of your IP, which is not stored in a form anyone can reverse. Every build adds 2 team-years to the counter on the homepage.
Then try these
Questions
How hard is Connect Four to rebuild with an AI agent?
Yes — every game is buildable at some scope. The question is how hard, and Connect Four is EASY (1 of 5). You will get essentially the whole thing. Nothing here is hard; the only bug worth naming is the diagonal win check walking off the array in a corner, and that is a bounds test you write once. Reckon on an evening to something you can actually play — not to something that matches the 2 team-years Ned Strongin and Howard Wexler spent.
What makes Connect Four hard to rebuild?
Nothing here is hard; the only bug worth naming is the diagonal win check walking off the array in a corner, and that is a bounds test you write once. That is why it sits at EASY rather than a tier either side of it. If you want the idea without the project, the transferable part is scan outward from the last move only — an evening of work.
How long does it take to build a Connect Four clone?
Wrong question, and it is worth saying why. Nobody rebuilds Connect Four — the original took Ned Strongin and Howard Wexler on the order of 2 team-years, released in 1974 on Classic. What you can do is reach something playable and genuinely yours in about an evening, and then keep going for as long as it stays interesting. Any figure that claims otherwise is measuring a prototype and calling it a game.
What do I lose by building my own Connect Four?
The Milton Bradley trademark and that particular blue plastic frame with the yellow legs. The clatter of the discs and the release lever that dumps the whole board out, which is the best part of the product. A solved-game opening book, unless you are prepared to ship a few hundred megabytes of endgame database. Those are the parts a prompt will not hand you.
Which AI coding agent should I use to build it?
Any of Claude Code, Codex or Cursor will handle this prompt. Paste it as your first message, let the agent scaffold the project, then iterate on feel — the second, third and tenth prompts are where a game actually gets good. Work in an empty folder or a fresh git branch so you can throw it away cheaply.
One email when new games go on the list. No other reason to email you, ever.