Skip to content

Commit

Permalink
Update FCS.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
kyle-flynn committed Sep 25, 2024
1 parent b0a8419 commit c29b99b
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions back-end/realtime/src/rooms/FCS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ import {
} from '@toa-lib/models';
import Room from './Room.js';
import Match from './Match.js';
import { defaultMatchDetails } from '@toa-lib/models/build/seasons/FeedingTheFuture.js';
import { PacketManager } from '@toa-lib/models/build/fcs/FeedingTheFutureFCS.js';
import { Worker } from 'worker_threads';
import { fileURLToPath } from 'url';
import { dirname, join } from 'path';
Expand All @@ -27,13 +25,13 @@ export default class FCS extends Room {
// private wledControllers: Record<string, WledController> = {};
private wledControllers: Record<string, Worker> = {};
private previousMatchDetails: FeedingTheFuture.MatchDetails =
defaultMatchDetails;
private packetManager: PacketManager;
FeedingTheFuture.defaultMatchDetails;
private packetManager: FeedingTheFutureFCS.PacketManager;

public constructor(server: Server, matchRoom: Match) {
super(server, 'fcs');

this.packetManager = new PacketManager(
this.packetManager = new FeedingTheFutureFCS.PacketManager(
FeedingTheFutureFCS.defaultFieldOptions,
this.broadcastFcsUpdate,
matchRoom.localEmitter
Expand Down Expand Up @@ -77,7 +75,7 @@ export default class FCS extends Room {
match.details,
this.broadcastFcsUpdate
);
this.previousMatchDetails = { ...match.details };
this.previousMatchDetails = JSON.parse(JSON.stringify(match.details));
}
);
}
Expand Down

0 comments on commit c29b99b

Please sign in to comment.