6 lines
244 B
TypeScript
6 lines
244 B
TypeScript
/** Number of sheets needed for `count` cards when the first card goes in slot `start` (1 to 3). */
|
|
export function sheetCount(count: number, start: number): number {
|
|
if (count <= 0) return 0;
|
|
return Math.ceil((count + (start - 1)) / 3);
|
|
}
|