Added Backend Classes and FUnctions for an working Game. But lacking Implementations
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user