feat: add math engine and puzzle services

This commit is contained in:
2026-08-09 01:52:20 +08:00
parent 6bcff55c4f
commit b99a22fc06
21 changed files with 1011 additions and 1 deletions
+18
View File
@@ -7,6 +7,11 @@ from .views import (
LeaderboardView,
MatchmakingView,
MatchStateView,
MathGameCatalogView,
MathGameHistoryView,
MathGameStartView,
MathGameSubmitView,
SudokuHintView,
)
urlpatterns = [
@@ -16,4 +21,17 @@ urlpatterns = [
path("<slug:slug>/leaderboard/", LeaderboardView.as_view(), name="leaderboard"),
path("attempts/<uuid:attempt_id>/submit/", AttemptSubmitView.as_view(), name="attempt-submit"),
path("matches/<uuid:match_id>/", MatchStateView.as_view(), name="match-state"),
path("games/", MathGameCatalogView.as_view(), name="math-game-catalog"),
path("games/history/", MathGameHistoryView.as_view(), name="math-game-history"),
path("games/<str:kind>/start/", MathGameStartView.as_view(), name="math-game-start"),
path(
"games/attempts/<uuid:attempt_id>/submit/",
MathGameSubmitView.as_view(),
name="math-game-submit",
),
path(
"games/attempts/<uuid:attempt_id>/hint/",
SudokuHintView.as_view(),
name="sudoku-hint",
),
]