This commit is contained in:
nim-ka
2022-10-29 02:54:53 +00:00
parent bc0bbdccd2
commit 2aa7b15848
2 changed files with 23 additions and 10 deletions

View File

@@ -29,7 +29,7 @@ class Grid {
fillFromStr(str, sep = "") { return this.fillFromArr(str.split("\n").map((line) => line.split(sep))) }
static fromArr(arr) { return new Grid(arr[0].length, arr.length).fillFromArr(arr) }
static fromStr(str, sep = "") { return Grid.fromArr(str.split("\n").map((line) => line.split(sep)) }
static fromStr(str, sep = "") { return Grid.fromArr(str.split("\n").map((line) => line.split(sep))) }
get(pt) {
if (this.contains(pt)) {