feedback5 R2: PlayerState.js → server/match/player/*.js, a pure move — the 87 class members (82 methods and the isHumanActive / botControlled / deployCap / deployCount / tempEmpty getters), verbatim with their comments, go to 9 per-concern method containers (basics, pieces, acquire, economy, placement, items, prep, round, views) that PlayerState.js installs on PlayerState.prototype in a fixed order with class-method descriptors (a name defined twice throws); HAND_SIZE, TEMP_SIZE, MAX_OFFER_SLOTS, OK and fail go to player/common.js; PlayerState.js keeps the header (+ a code-layout paragraph), the class with its constructor and the FIELD re-export. Section-header comments are replaced by the module headers. docs-consistency reads the method modules (playerText), pins layerGainRoom in player/economy.js and checks that no Match / PlayerState module has a layerRoom
This commit is contained in:
1 parent
1ca4936f0a
commit
64443b4aab
12 files changed
+1631
-1519
No files matched your search
@@ -0,0 +1,11 @@
|
||||
// server/match/player/common.js — constants and small helpers shared by the PlayerState method modules
|
||||
// (server/match/player/*.js) and its constructor (server/match/PlayerState.js).
|
||||
|
||||
import { GEO } from '../../../shared/constants.js';
|
||||
|
||||
export const HAND_SIZE = GEO.HAND_SIZE;
|
||||
export const TEMP_SIZE = GEO.TEMP_SIZE;
|
||||
/** g.reward accepts idx 0..5 (shared/protocol.js) */
|
||||
export const MAX_OFFER_SLOTS = 6;
|
||||
export const OK = Object.freeze({ ok: true });
|
||||
export const fail = (error, detail) => (detail ? { error, detail } : { error });
|
||||
Reference in new issue
Block a user