diff --git a/src/engine/Math/Graph.ts b/src/engine/Math/Graph.ts index 18175a42..8864ecaf 100644 --- a/src/engine/Math/Graph.ts +++ b/src/engine/Math/Graph.ts @@ -792,12 +792,13 @@ export class PositionNode extends Node { export type Vertex = Node; class GraphUUId { + static rng: Random = new Random(); + static generateUUID(): G_UUID { - const rng = new Random(); const uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'; const generatedUuid = uuid.replace(/[xy]/g, function (c) { - const r = (rng.nextInt() * 16) | 0; + const r = (GraphUUId.rng.next() * 16) | 0; const v = c === 'x' ? r : (r & 0x3) | 0x8; return v.toString(16); }); diff --git a/src/spec/GraphSpec.ts b/src/spec/GraphSpec.ts index 57d47218..858fe9ec 100644 --- a/src/spec/GraphSpec.ts +++ b/src/spec/GraphSpec.ts @@ -1,6 +1,6 @@ import * as ex from '@excalibur'; -fdescribe('A Graph', () => { +describe('A Graph', () => { let graph: ex.Graph; beforeEach(() => {