Skip to content

Commit

Permalink
Change MayamSymbol to Glyph
Browse files Browse the repository at this point in the history
  • Loading branch information
pstalcup committed Dec 19, 2024
1 parent f276727 commit a3429ae
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/garbo/src/resources/mayam.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const MAYAM_RING_VALUES = {
clock: () => 5 * get("valueOfAdventure"),
};

function valueSymbol(symbol: MayamCalendar.MayamSymbol): number {
function valueSymbol(symbol: MayamCalendar.Glyph): number {
return MAYAM_RING_VALUES[symbol]();
}

Expand All @@ -75,7 +75,7 @@ function valueCombination(
}

function getAvailableResonances(
forbiddenSymbols: MayamCalendar.MayamSymbol[],
forbiddenSymbols: MayamCalendar.Glyph[],
): MayamCalendar.CombinationString[] {
return MayamCalendar.RESONANCE_KEYS.filter(
(combination) =>
Expand All @@ -87,7 +87,7 @@ function getAvailableResonances(

function getBestAvailableSymbolFromRing<R extends Range<0, 4>>(
ring: R,
forbiddenSymbols: MayamCalendar.MayamSymbol[],
forbiddenSymbols: MayamCalendar.Glyph[],
): (typeof MayamCalendar.RINGS)[R][number] {
return maxBy(
MayamCalendar.RINGS[ring].filter((sym) => !forbiddenSymbols.includes(sym)),
Expand All @@ -96,7 +96,7 @@ function getBestAvailableSymbolFromRing<R extends Range<0, 4>>(
}

function getBestGreedyCombination(
forbiddenSymbols: MayamCalendar.MayamSymbol[],
forbiddenSymbols: MayamCalendar.Glyph[],
): MayamCalendar.CombinationString {
return MayamCalendar.toCombinationString([
getBestAvailableSymbolFromRing(0, forbiddenSymbols),
Expand Down

0 comments on commit a3429ae

Please sign in to comment.