forked from noxious/server
Removed console.log
This commit is contained in:
parent
6b2433f814
commit
90ac7728d9
@ -6,7 +6,6 @@ import { ExtendedCharacter } from '../utilities/types'
|
|||||||
class LoadedZone {
|
class LoadedZone {
|
||||||
private readonly zone: Zone
|
private readonly zone: Zone
|
||||||
// private readonly npcs: ZoneNPC[] = []
|
// private readonly npcs: ZoneNPC[] = []
|
||||||
private readonly grid: number[][] = []
|
|
||||||
|
|
||||||
constructor(zone: Zone) {
|
constructor(zone: Zone) {
|
||||||
this.zone = zone
|
this.zone = zone
|
||||||
@ -16,10 +15,6 @@ class LoadedZone {
|
|||||||
return this.zone
|
return this.zone
|
||||||
}
|
}
|
||||||
|
|
||||||
public getCharacters(): ExtendedCharacter[] {
|
|
||||||
return characterManager.getCharactersInZone(this.zone)
|
|
||||||
}
|
|
||||||
|
|
||||||
public async getGrid(): Promise<number[][]> {
|
public async getGrid(): Promise<number[][]> {
|
||||||
let grid: number[][] = Array.from({ length: this.zone.height }, () => Array.from({ length: this.zone.width }, () => 0))
|
let grid: number[][] = Array.from({ length: this.zone.height }, () => Array.from({ length: this.zone.width }, () => 0))
|
||||||
|
|
||||||
@ -32,10 +27,13 @@ class LoadedZone {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
console.log(grid)
|
|
||||||
return grid
|
return grid
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @TODO: Implement this
|
||||||
|
* @param position
|
||||||
|
*/
|
||||||
public async isPositionWalkable(position: { x: number; y: number }): Promise<boolean> {
|
public async isPositionWalkable(position: { x: number; y: number }): Promise<boolean> {
|
||||||
const grid = await this.getGrid()
|
const grid = await this.getGrid()
|
||||||
if (!grid?.length) return false
|
if (!grid?.length) return false
|
||||||
|
Loading…
x
Reference in New Issue
Block a user