mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2025-01-06 21:37:34 +01:00
18 lines
524 B
TypeScript
18 lines
524 B
TypeScript
// Function that returns the next Company Position in the "ladder"
|
|
// i.e. the next position to get promoted to
|
|
import { CompanyPosition } from "./CompanyPosition";
|
|
import { CompanyPositions } from "./CompanyPositions";
|
|
|
|
export function getNextCompanyPositionHelper(currPos: CompanyPosition | null): CompanyPosition | null {
|
|
if (currPos == null) {
|
|
return null;
|
|
}
|
|
|
|
const nextPosName: string | null = currPos.nextPosition;
|
|
if (nextPosName == null) {
|
|
return null;
|
|
}
|
|
|
|
return CompanyPositions[nextPosName];
|
|
}
|