Skip to content
Home

2026, soloC++17 · console · zero dependencies

laying_grass

A tile-laying game inspired by "The Devil's Plan", written in pure C++17: standard library only, right down to the JSON parser.

Zero dependencies, literally.

The game reads its 96 tile shapes from a JSON file. Pulling in a library to read one file would have been quicker to write; the parser is hand-written instead. That is the decision that sums up the project, and the one that teaches the most.

Two to nine players, on a 20 × 20 or 30 × 30 grid depending on the count, nine rounds each. Tiles rotate and flip. The winner is whoever holds the largest filled square at the end; ties are broken by total territory.

A game in progress in the terminal: the grid, the available tiles and the players' scores.
A game in progress, exactly as the program draws it in the terminal.

Architecture

The architecture

A clean separation between rules, placement validation, algorithms and display. Game holds the logic, Validator decides whether a move is legal, Algorithms carries the largest-square search and the connectivity computation, Board manages the grid and territories. RAII, enum class, constexpr, STL: the language's own tools rather than patches.

Three bonus mechanics sit on top of placement: exchange coupons, which let you pick from the next five tiles; stones, which block an opponent; and annexation, which takes a cell from the territory across the board.

The repository is documented separately: getting started, architecture and implementation decisions, detailed rules, file tree and inter-module dependencies.

Next