@energy8platform/game-engine 0.35.0 → 0.36.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -225,8 +225,13 @@ function paytableSection(model: GameModel, t: (s: string) => string = (s) => s):
225
225
  return { type: 'paytable', rows };
226
226
  }
227
227
 
228
- /** Build a "wins" illustration section sized to the grid; `kind` follows the spec mechanic hint. */
229
- function winsSection(model: GameModel): GameInfoSection {
228
+ /** Build a "wins" illustration section sized to the grid; `kind` follows the spec mechanic hint.
229
+ *
230
+ * Every mechanic that has an illustration names itself. An unrecognised one renders NOTHING
231
+ * rather than borrowing `anywhere`'s picture: the section exists to show the player how wins
232
+ * form, and a drawing of the wrong mechanic teaches them something false. Silence is the honest
233
+ * answer — the rest of the info screen (paytable, modes, controls) still renders. */
234
+ function winsSection(model: GameModel): GameInfoSection | null {
230
235
  const { cols, rows } = model.spec.grid;
231
236
  const grid = { cols, rows };
232
237
  switch (model.spec.mechanic) {
@@ -234,8 +239,10 @@ function winsSection(model: GameModel): GameInfoSection {
234
239
  return { type: 'wins', kind: 'cluster', minCount: 5, grid } as GameInfoSection;
235
240
  case 'ways':
236
241
  return { type: 'wins', kind: 'ways', grid } as GameInfoSection;
237
- default:
242
+ case 'anywhere':
238
243
  return { type: 'wins', kind: 'anywhere', minCount: 3, grid } as GameInfoSection;
244
+ default:
245
+ return null;
239
246
  }
240
247
  }
241
248
 
@@ -290,7 +297,8 @@ export function defaultGameInfo(
290
297
  tDisclaimer: (s: string) => string = t,
291
298
  ): GameInfoContent {
292
299
  const sections: GameInfoSection[] = [];
293
- sections.push(winsSection(model));
300
+ const wins = winsSection(model);
301
+ if (wins) sections.push(wins);
294
302
  const pay = paytableSection(model, t);
295
303
  if (pay) sections.push(pay);
296
304
  const modes = modesSection(model, t);
package/src/host/types.ts CHANGED
@@ -79,10 +79,14 @@ export interface ArtubeIntegration {
79
79
  /** Starting virtual balance for a DEMO session (the platform doesn't keep one — the bridge does,
80
80
  * client-side). Default: the backend's own configured demo balance. Ignored for real sessions. */
81
81
  demoBalance?: number;
82
- /** Origin of the game's backend. Default (and the only supported PRODUCTION value) is the launch
83
- * URL's own origin: Artube serves frontend and backend on one domain, split by path (`/api/**`).
84
- * Override only for local dev against a backend on another port prefer proxying `/api` from the
85
- * dev server (what the `BUILD_TARGET=artube` target does) so dev matches production. */
82
+ /** Base address of the game's backend; the bridge appends `/api/ws`. Default is the launch page's
83
+ * own PATH RE-ROOTED UNDER `/api`: Artube serves a game's static bundle from a CDN bucket at
84
+ * `/<slug>/` and mounts its backend on a separate proxy route at `/api/<slug>/**`, so the page at
85
+ * `https://host/artube-xxx/` talks to `wss://host/api/artube-xxx/api/ws`. At the root (local dev,
86
+ * or a root-mounted deployment) there is nothing to re-root and the default is just the origin.
87
+ * Override for local dev against a backend on another port — prefer proxying `/api` from the dev
88
+ * server (what `BUILD_TARGET=artube` does) so dev matches — or to state the address outright if a
89
+ * deployment is ever mounted differently than the above. */
86
90
  apiBase?: string;
87
91
  }
88
92
 
package/src/vite/index.ts CHANGED
@@ -25,7 +25,7 @@ export interface GameConfig {
25
25
 
26
26
  /**
27
27
  * Starting gRPC port for the spin dev server (default: `E8_SERVER_PORT`
28
- * → 50151). If the port is taken — e.g. another game's `npm run dev` is
28
+ * → 20151). If the port is taken — e.g. another game's `npm run dev` is
29
29
  * already up — the next free one is used instead.
30
30
  */
31
31
  spinPort?: number;