mirror of
https://github.com/TextPlace/CoreTextPlace.git
synced 2025-07-09 21:25:32 +00:00
test: board
This commit is contained in:
parent
b2158a63c2
commit
302d6cef3e
3 changed files with 150 additions and 3 deletions
|
@ -8,9 +8,13 @@ import type {
|
|||
import { createSection } from "./section.ts";
|
||||
|
||||
export function createBoard(config: BoardConfig): BoardData {
|
||||
const sections: SectionData[][] = Array(config.ySections).map((_, sy) =>
|
||||
Array(config.xSections).map((_, sx) => createSection({ sx, sy }, config))
|
||||
);
|
||||
const sections: SectionData[][] = Array(config.ySections)
|
||||
.fill(0)
|
||||
.map((_, sy) =>
|
||||
Array(config.xSections)
|
||||
.fill(0)
|
||||
.map((_, sx) => createSection({ sx, sy }, config))
|
||||
);
|
||||
|
||||
return { config, sections };
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue