Add desktop games, robot pet and TCG app
This commit is contained in:
1 parent
812503251b
commit
c664f573b8
55 files changed
+5090
-15
No files matched your search
@@ -0,0 +1,11 @@
|
||||
export interface PixelRun {
|
||||
x: number;
|
||||
y: number;
|
||||
width: number;
|
||||
}
|
||||
|
||||
export function pixelRuns(rows: string[]): PixelRun[] {
|
||||
return rows.flatMap((row, y) =>
|
||||
[...row.matchAll(/X+/g)].map((match) => ({ x: match.index ?? 0, y, width: match[0].length }))
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user