public void setLevel(LevelDefinition level) { this.nRows = level.getHeight(); this.nCols = level.getWidth(); this.cellHeight = this.canvasHeight / this.nRows; this.cellWidth = this.canvasWidth / this.nCols; this.currentLayout = new GameObject[this.nRows * this.nCols]; this.addLevelObjects(level); }