Skip to content
Leslie Paul Ajayi
Note 003
All writing

2026.10.02 · 3 min read

Put the rules in a package with no dependencies.

How 4-Man Chess validates a move in the browser and on the server with the same code.

Chess for three or four players breaks assumptions that ordinary chess code makes without saying so: whose turn is next, what counts as check, what happens when a player is eliminated.

So the rules live in one pure TypeScript package with no runtime dependencies. The web client imports it to show legal moves. The game server imports it to decide whether a move is allowed. They cannot disagree because they are the same code.

The server stays authoritative. The client's copy is only for responsiveness. If they ever diverge, the server wins and the client resyncs.

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.