Draft copy

RPSLS

Rock, Paper, Scissors, Lizard, Spock for two players. Enter your names, pick your weapons, and the first to five wins.

Solo developer · Bootstrap / Node.js / Express / EJS / Vite / Mocha · 2023

The problem

A classic kata with a twist: two extra weapons make the win rules too big for a chain of if-statements.

What I built

An Express app with server-rendered EJS views. The game logic lives in small classes (Battle, Player, Weapon) with Mocha tests.

The hard parts

Keeping game state between requests without a database, by serialising it into each page.

What I’d change

The version you can run here is a static port of the same game logic, so it works without a server.

Vim keys

j / kNext / previous project
EnterOpen the case study
rRun it live
/Filter projects
:run <name>Run a project from anywhere
:cv :about :work :homeGo to a page
:theme light | darkSwitch theme
:w :wqWrite (vim says so) / and leave
:qLeave vim mode (home, on a 404)
EscLeave vim mode