fast-ttt
ASCII tic-tac-toe over HTTP, played with curl to teach client/server
About
fast-ttt is a minimal teaching tool that demonstrates client/server principles using a game of tic-tac-toe. Two players interact over plain HTTP with curl or a web browser, and the FastAPI server replies with ASCII boards and text only — no HTML, JavaScript, CSS, or JSON (the sole exception being FastAPI's auto-generated Swagger UI at /docs). It supports creating games, viewing boards, playing numbered moves, random auto-moves, per-game move history, and home-page statistics, with winning lines highlighted. Game state is persisted in SQLite via SQLAlchemy, and moves commit atomically across board, turn, status, and history. Docs (OVERVIEW.md and FAST-API.md) are served by the app itself to explain how clients and servers communicate.
Summary
A text-based tic-tac-toe game served by FastAPI that responds in pure plain text, playable by two players using curl or a browser.
Tech
- Python
- FastAPI
- uvicorn
- SQLAlchemy
- SQLite
- pydantic
- pytest
- httpx
Tags
- cli
- game
- http
- plain-text
- teaching
- tic-tac-toe