mirror of
https://github.com/tiennm99/caro.git
synced 2026-05-19 23:25:42 +00:00
22bb9c1371
Separate web-client/ directory with Phaser 3 + Vite + vanilla JS: - Services: event bus, WebSocket connection (heartbeat, reconnect), game state, protocol constants matching server enums - Scenes: BootScene (connect), MenuScene (DOM overlay), GameScene (canvas board with grid, stones, hover, click-to-move, animations) - Objects: Board (wood grid, star points, labels), Stone (gradient circles with drop tween animation) - UI: DOM overlays for nickname, lobby, PVP/PVE menus, room list, waiting room, game HUD, game over, toast notifications - Audio: Web Audio API stone click + win/lose tones - Full game flow: nickname → lobby → create/join/PVE → play → game over
8 lines
175 B
JavaScript
8 lines
175 B
JavaScript
import Phaser from 'phaser';
|
|
import { gameConfig } from './config/game-config.js';
|
|
|
|
/** @type {Phaser.Game} */
|
|
const game = new Phaser.Game(gameConfig);
|
|
|
|
export default game;
|