Skip to content
Leslie Paul Ajayi
Work · Built
All work

4-Man Chess

Chess for 2, 3 or 4 players: classic, hexagon and cross boards, with friends or bots.

4-Man Chess, the live product
Role
Engineer
Category
Multiplayer game
Year
2026
Status
Playable

What it is

Classic 8×8, a three-player hexagon and a four-player cross. Every seat is a friend joining with a room code, or a bot.

Shape of the repo

A pnpm + Turborepo monorepo. The rules live in one pure TypeScript package with no runtime dependencies, shared by the web client and the game server.

The server is the referee

The server is authoritative and keeps rooms in memory. A reload or dropped connection puts you back in your seat. Anyone joining a full game watches.

Testing the bots

Bots aren't just named, they're measured. Hard never got knocked out in 40 games against three Easy bots. Advanced won 25 of 40 against three Hard bots, where even would be 10.

How it's built

  1. 01Next.js clientLobby, board, live updates
  2. 02Typed eventsShared Socket.IO event types
  3. 03Game serverFastify + Socket.IO, authoritative
  4. 04Game enginePure TypeScript rules, zero runtime deps
  5. 05BotsEasy · Hard · Advanced

Top: what the user touches. Bottom: what holds it up.

Key decisions

  • Rules as a library, not a feature

    Because the engine has no dependencies, the same code validates a move in the browser and on the server.

  • Bots join like any other device

    A script can add bots from the terminal over Socket.IO, exactly like a player on a phone. No special path.

What I learned

Three- and four-player chess breaks assumptions that 'chess' code quietly makes: turn order, check, elimination.

Stack

  • Next.js
  • TypeScript
  • Fastify
  • Socket.IO
  • pnpm
  • Turborepo

Screens

4-Man Chess on desktop
4-Man Chess on a phone
Next projectscrapy-mcp
Contact

Based in Accra, Ghana

Have a problem worth solving?

I'm interested in engineering roles, product collaborations and well-scoped builds. Email is the fastest way to reach me.

  • GitHub

    Leslie-23 · 171 public repositories

  • LinkedIn

    /in/leslie-paul-ajayi

  • X

    @_iam_leslie

  • npm

    npm-git-helper, v3.0.0

© 2026 Leslie Paul Ajayi--:-- in Accra

Where I am from, and where I build

That is why I am building for Africa.