Requred items.js from algos.coffee We do not need to pass items{} to scoring function anymore.

Alogos are still BROKEN. I'm deploying them here for testing.
This commit is contained in:
yangit
2013-05-15 21:59:01 +08:00
parent 15c2dc3497
commit 28aa7d2e4f
5 changed files with 466 additions and 148 deletions
+2 -1
View File
@@ -7,6 +7,7 @@
)}).define (require, exports, module)->
helpers = require('./helpers')
moment = require('./moment')
items = require('./items')
XP = 15
HP = 2
obj = module.exports =
@@ -166,7 +167,7 @@
# {task} task you want to score
# {direction} 'up' or 'down'
obj.score = (user, task, direction, items) ->
obj.score = (user, task, direction) ->
{gp, hp, exp, lvl} = user.stats
{type, value, streak} = task
priority = task.priority or '!'