feat(#10): remove redundancy

This commit is contained in:
Juan Sebastián Montoya 2024-09-17 23:16:36 -05:00
parent 9f1d83bf45
commit 37a7b76d38
5 changed files with 22 additions and 45 deletions

View file

@ -3,8 +3,7 @@ import { Map } from "./map.js";
export class MapManagement extends GameObject {
constructor({ maps = [] }) {
super();
this.gameObjects = maps.map((item) => new Map(item));
super({ gameObjects: maps.map((item) => new Map(item)) });
this.elementsId = this.gameObjects.map((item) => item.elementId);
}