MCPcopy Create free account
hub / github.com/SethGammon/Citadel / constructor

Method constructor

scripts/grid.cjs:45–49  ·  view source on GitHub ↗
(w, h)

Source from the content-addressed store, hash-verified

43
44class Grid {
45 constructor(w, h) {
46 this.w = w;
47 this.h = h;
48 this.cells = Array.from({ length: h }, () => Array(w).fill(' '));
49 }
50
51 put(x, y, char) {
52 if (x >= 0 && x < this.w && y >= 0 && y < this.h) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected