Skip to content

Commit

Permalink
Remove config.xml and update level summary logic; adjust next level r…
Browse files Browse the repository at this point in the history
…etrieval to return null when no next level exists
  • Loading branch information
tech_e committed Jan 15, 2025
1 parent bfc22b2 commit b454ee4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 43 deletions.
41 changes: 0 additions & 41 deletions config.xml

This file was deleted.

4 changes: 2 additions & 2 deletions src/game/level/levels.js
Original file line number Diff line number Diff line change
Expand Up @@ -228,13 +228,13 @@ export const Levels =
/**
* This will get the next level.
*
* @returns {object}
* @returns {object|null}
*/
getNextLevel()
{
const activeLevels = this.activeLevels;
let index = (this.currentLevel)? activeLevels.indexOf(this.currentLevel) : 0;
const nextLevelIndex = (index < activeLevels.length - 1)? ++index : 0;
const nextLevelIndex = (index < activeLevels.length - 1)? ++index : null;
return activeLevels[nextLevelIndex];
},

Expand Down

0 comments on commit b454ee4

Please sign in to comment.