export class BalancePolicy
{
    applyPreventAddBalanceFlag(modes: any[])
    {
        const [mainMode, ...rest] = modes;

        if (!mainMode) return;

        if (rest.length === 0)
        {
            mainMode.gameData.preventAddBalance = true;

            return;
        }

        // TODO: check and delete if it's not needed
        if (rest.every((m) => m.isExitConditionMet()))
        {
            mainMode.gameData.preventAddBalance = true;
        }
    }
}
