mirror of
https://github.com/tiennm99/gomoku.git
synced 2026-05-20 14:24:04 +00:00
4c068849c4
Rename - server/database/ → server/lobby/ (17 import sites + qualified references) - Package was named "database" but there is no database — it's in-memory hashmaps for players/rooms/spectators. "lobby" accurately names its role: the multiplayer game lobby state (who is in what room, joining/leaving, spectating). Ratel-online legacy cleanup - Delete server/README.md — 100% Chinese, entirely about ratel card games (斗地主/跑得快/德州扑克/麻将/骗子酒馆/Uno). Zero relevance to gomoku. - Delete server/build.sh + server/build.ps1 — multi-platform ratel-server build scripts with mixed Chinese comments, superseded by Makefile + Dockerfile. - Delete server/docs/ — Chinese Docker deployment guide + quickstart, superseded by root docs/deployment-guide.md and root README.md. - Delete server/demo.gif — ratel card-game demo screenshot. Comment fixes: update "database" references in consts/const.go and game/board.go package docs to point at "lobby" instead. go vet + go test ./... green.
27 lines
597 B
Go
27 lines
597 B
Go
// Package consts exposes cross-package constants used by the state machine
|
|
// and room logic. Kept intentionally small — domain enums (RoomType, RoomStatus,
|
|
// Piece, GameResult) live in their respective packages (lobby, game, protocol).
|
|
package consts
|
|
|
|
// StateID identifies a state in the per-player state machine.
|
|
type StateID int
|
|
|
|
const (
|
|
_ StateID = iota
|
|
StateWelcome
|
|
StateSetNickname
|
|
StateHome
|
|
StateWaiting
|
|
StateGamePvp
|
|
StateGamePve
|
|
StateGameOver
|
|
StateWatching
|
|
)
|
|
|
|
// AI difficulty levels for PVE rooms.
|
|
const (
|
|
DifficultyEasy = 1
|
|
DifficultyMedium = 2
|
|
DifficultyHard = 3
|
|
)
|