-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtypes.ts
57 lines (51 loc) · 1.02 KB
/
types.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
type RequiredCellDirection = {
cells: number[],
len: number,
};
export type CellDirection = RequiredCellDirection & Partial<{
clue: string,
clueIndex: number,
}>;
export type Cell = {
across: CellDirection,
cell: number,
clueIndex: number,
down: CellDirection,
isAcross: boolean,
isDown: boolean,
isBlack: boolean,
isStart: boolean,
value: string,
};
export type Row = Cell[];
export type Grid = Row[];
export type Header = {
bic: number[],
checksum: number[],
cibChecksum: number[],
clues: number[],
height: number[],
magic: number[],
maskedHighChecksum: number[],
maskedLowChecksum: number[],
reserved1c: number[],
reserved20: number[],
unknown: number[],
unknown32: number[],
unknownMask: number[],
versionString: number[],
width: number[],
};
type RequiredPuz = {
valid: boolean,
};
export type Puz = RequiredPuz & Partial<{
author: string,
clues: string[],
copyright: string,
error: string,
grid: Grid,
header: Header,
solution: number[],
title: string,
}>;