16 lines
305 B
TypeScript
16 lines
305 B
TypeScript
import { BaseService } from '#application/base/baseService'
|
|
|
|
class MapService extends BaseService {
|
|
public flattenMapArray(tiles: string[][]) {
|
|
const normalArray = []
|
|
|
|
for (const row of tiles) {
|
|
normalArray.push(...row)
|
|
}
|
|
|
|
return normalArray
|
|
}
|
|
}
|
|
|
|
export default new MapService()
|