streetmesh / laravel-chess
The first StreetMesh Experience.
Package info
Language:Blade
pkg:composer/streetmesh/laravel-chess
Requires
- php: ^8.3
- bacon/bacon-qr-code: ^3.1
- illuminate/support: ^12.0|^13.0
- livewire/flux: ^2.13
- livewire/livewire: ^4.1
- streetmesh/laravel: ^0.1
Requires (Dev)
- larastan/larastan: ^3.0
- laravel/pint: ^1.18
- orchestra/testbench: ^10.0|^11.0
- phpunit/phpunit: ^11.4
README
Laravel Chess
Chess as a StreetMesh venue experience — and the first thing to use the framework rather than be it.
Two people who live on different servers play a game, and each of them ends up holding their own verifiable record of it. That sentence is the whole of v0, and this package is the part of it that is actually chess.
Developed in
Server, atpackages/laravel-chess, and published here. Issues and pull requests belong there.
What an experience turns out to be
Everything hard is asked for rather than built. Arriving from another server,
being seated, a room with an authoritative referee, a signed record at the end —
all of that belongs to Laravel-Venue,
Protocol-Laravel and
Hub.
What is left is three things:
room/src/room.ts |
The rules, enforced where a browser cannot argue with them. |
resources/views/livewire/ |
The screens: a lobby, and a board. |
src/Games.php |
What a finished game is worth writing down. |
The rules exist once. They are in the hub and nowhere else — the board draws what the room reports and asks for what somebody clicked, and PHP never learns how a knight moves. Two implementations of the rules would be two chances to disagree about who won.
The record
Each player gets their own, signed by the venue, written into the store they chose to live on. Separate records rather than one shared one, because there is no shared place for one to live: the players are on different servers, and after tonight this venue may not exist.
Written from each player's point of view — result: win rather than
winner: white — because it is their record of a thing that happened to them
rather than a row in somebody's database. It carries the moves, the final
position, and how it ended, since "checkmate" and "the other player left" are
different stories about the same result.
A player whose server refuses is skipped rather than failing the other. Somebody having withdrawn permission is an ordinary answer, and their opponent should still get their record.
Where this fits
| Where | What it is |
|---|---|
| Glossary | Every term here in plain words — venue, ticket, attestation, gathering. Start here if any of the above was unfamiliar. |
Protocol |
What StreetMesh is. |
Laravel‑Venue |
The venue this sits on: the door, and who is at which table. |
Hub |
The rooms this puts rules into. |
Server |
Where to start if you want to run one. |
License
MIT.