feat: add playable Blokus web UI with replay system
- Add blokus_ui package: Flask web app for human-vs-bot Blokus - GameSession: wraps BlokusGame for human play, records move history, serializes - RunStore: file-based JSON replay storage with save/load/list/delete - Flask app: routes for new game, play, save, browse runs, replay - Templates: index (new game + run browser), game (playable board), replay (step controls) - Static: CSS (dark theme, colored cells, placement overlays) + JS (click handling, API calls) - Add blokus_ui tests (19 tests for GameSession and RunStore) - Update pyproject.toml with flask dependency and blokus-ui entry point - Fix: remove unreachable dead code in BlokusGame.valid_move - All 102 tests pass, ruff lint clean
This commit is contained in:
+6
-2
@@ -5,12 +5,12 @@ build-backend = "setuptools.build_meta"
|
||||
[project]
|
||||
name = "blokus-gym"
|
||||
version = "0.1.0"
|
||||
description = "A Gymnasium-compatible RL environment for the board game Blokus"
|
||||
description = "A Gymnasium-compatible RL environment for the board game Blokus, with a playable web UI"
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.10"
|
||||
license = {text = "MIT"}
|
||||
authors = [{name = "Blokus Gym Contributors"}]
|
||||
keywords = ["reinforcement-learning", "gymnasium", "blokus", "board-game", "pettingzoo"]
|
||||
keywords = ["reinforcement-learning", "gymnasium", "blokus", "board-game", "pettingzoo", "flask", "game-ui"]
|
||||
classifiers = [
|
||||
"Development Status :: 3 - Alpha",
|
||||
"Intended Audience :: Science/Research",
|
||||
@@ -29,6 +29,7 @@ dependencies = [
|
||||
|
||||
[project.optional-dependencies]
|
||||
render = ["matplotlib>=3.7"]
|
||||
ui = ["flask>=3.0"]
|
||||
dev = [
|
||||
"pytest>=7.4",
|
||||
"pytest-cov>=4.1",
|
||||
@@ -45,6 +46,9 @@ train = [
|
||||
Homepage = "https://github.com/blokus-gym/blokus-gym"
|
||||
Documentation = "https://github.com/blokus-gym/blokus-gym#readme"
|
||||
|
||||
[project.scripts]
|
||||
blokus-ui = "blokus_ui.app:app"
|
||||
|
||||
[tool.setuptools.packages.find]
|
||||
where = ["src"]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user