|
|
|
@ -65,13 +65,13 @@ export interface HexMap { |
|
|
|
|
*/ |
|
|
|
|
readonly lineCells: readonly HexLine[] |
|
|
|
|
/** |
|
|
|
|
* A unique identifier for this map. Lets the client know when it is connecting to a different map with the same |
|
|
|
|
* name as this one, and its old map has been destroyed. |
|
|
|
|
* A unique identifier in https://github.com/rs/xid format for this map. Lets the client know when it is connecting
|
|
|
|
|
* to a different map with the same name as this one, and its old map has been destroyed. |
|
|
|
|
*/ |
|
|
|
|
readonly guid: string |
|
|
|
|
readonly xid: string |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
export function initializeMap({lines, cells_per_line, displayMode, guid}: {lines: number, cells_per_line: number, displayMode: HexMapRepresentation, guid: string}): HexMap { |
|
|
|
|
export function initializeMap({lines, cells_per_line, displayMode, xid}: {lines: number, cells_per_line: number, displayMode: HexMapRepresentation, xid: string}): HexMap { |
|
|
|
|
const lineCells: HexLine[] = []; |
|
|
|
|
const emptyLine: HexCell[] = []; |
|
|
|
|
for (let cell = 0; cell < cells_per_line; cell += 1) { |
|
|
|
@ -85,7 +85,7 @@ export function initializeMap({lines, cells_per_line, displayMode, guid}: {lines |
|
|
|
|
cells_per_line, |
|
|
|
|
displayMode, |
|
|
|
|
lineCells, |
|
|
|
|
guid |
|
|
|
|
xid |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|