@jeremyckahn/farmhand
Version:
A farming game
17 lines (13 loc) • 330 B
text/typescript
import { season } from '../enums.js'
export const getSeasonalDemandStatus = (
item: farmhand.item,
currentSeason: season
): 'HIGH' | 'LOW' | null => {
if (item.highDemandSeasons?.includes(currentSeason)) {
return 'HIGH'
}
if (item.lowDemandSeasons?.includes(currentSeason)) {
return 'LOW'
}
return null
}