refactor: Extract constants into constants file

This commit is contained in:
Blade Barringer
2015-12-26 19:40:36 -06:00
parent ba31cda85d
commit 1b118d86b2
4 changed files with 26 additions and 35 deletions

View File

@@ -1,11 +1,13 @@
import {
MAX_LEVEL,
} from './constants';
/*
------------------------------------------------------
Level cap
------------------------------------------------------
*/
export const MAX_LEVEL = 100;
export function capByLevel (lvl) {
if (lvl > MAX_LEVEL) {
return MAX_LEVEL;
@@ -14,22 +16,6 @@ export function capByLevel (lvl) {
}
}
/*
------------------------------------------------------
Stats cap
------------------------------------------------------
*/
export const MAX_STAT_POINTS = MAX_LEVEL;
/*
------------------------------------------------------
Health cap
------------------------------------------------------
*/
export const MAX_HEALTH = 50;
/*
------------------------------------------------------
Scoring