Added Backend Classes and FUnctions for an working Game. But lacking Implementations

This commit is contained in:
jhim
2026-02-27 11:16:21 +01:00
committed by Jonas
parent 120c671dce
commit 5db7ac1676
12 changed files with 183 additions and 15 deletions
+2 -1
View File
@@ -1,10 +1,11 @@
import type { FieldSize } from '@/scripts/interfaces/FieldSize.ts'
import buildFieldArray from '@/scripts/utils/BuildFieldArray'
class LocalGame {
public field: number[][]
constructor(fieldSize: FieldSize) {
this.field = Array.from({ length: fieldSize.y }, () => Array(fieldSize.x).fill(0))
this.field = buildFieldArray(fieldSize);
}
}