TrainsAndRoads/interface/types/PlacedPiece.ts

30 lines
620 B
TypeScript

import { TrackType } from "../constants/TrackType";
import { Cell } from "./Cell";
import { InternalNode } from "./InternalNode";
import { Node } from "./Node";
export class PlacedPiece {
tracks: Set<{
nodes: {
firstNode: Node;
secondNode: Node;
};
type: TrackType;
}>;
internalNodes: Set<InternalNode>;
cell: Cell;
constructor(
tracks: Set<{
nodes: { firstNode: Node; secondNode: Node };
type: TrackType;
}>,
internalNodes: Set<InternalNode>,
cell: Cell,
) {
this.tracks = tracks;
this.internalNodes = internalNodes;
this.cell = cell;
}
}