mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-01 17:33:26 +00:00
store name, anon has random suffix, color a hash of name
This commit is contained in:
@@ -11,6 +11,7 @@ import {and, bfs, dist, manhattanDist} from "../core/Util";
|
||||
import {TerrainRenderer} from "./graphics/TerrainRenderer";
|
||||
|
||||
|
||||
|
||||
export function createClientGame(name: string, clientID: ClientID, playerID: PlayerID, ip: string | null, gameID: GameID, config: Config, terrainMap: TerrainMap): ClientGame {
|
||||
let eventBus = new EventBus()
|
||||
let game = createGame(terrainMap, eventBus, config)
|
||||
@@ -32,7 +33,6 @@ export function createClientGame(name: string, clientID: ClientID, playerID: Pla
|
||||
}
|
||||
|
||||
export class ClientGame {
|
||||
|
||||
private myPlayer: Player
|
||||
private turns: Turn[] = []
|
||||
private socket: WebSocket
|
||||
@@ -119,6 +119,8 @@ export class ClientGame {
|
||||
public start() {
|
||||
console.log('version 3')
|
||||
|
||||
|
||||
|
||||
this.isActive = true
|
||||
// TODO: make each class do this, or maybe have client intercept all requests?
|
||||
//this.eventBus.on(TickEvent, (e) => this.tick(e))
|
||||
|
||||
Reference in New Issue
Block a user