Add plan builder and tests

This commit is contained in:
Andrew Miner
2015-09-19 09:31:14 -07:00
parent f6b71c9464
commit 6ea97ac3aa
9 changed files with 198 additions and 10 deletions
@@ -14,6 +14,7 @@ module.exports = class ItemNode extends CraftingNode
@::ENTER_METHOD = 'onEnterItemNode'
@::LEAVE_METHOD = 'onLeaveItemNode'
@::TYPE = CraftingNode::TYPES.ITEM
constructor: (options={})->
if not options.item? then throw new Error 'options.item is required'
@@ -58,8 +59,10 @@ module.exports = class ItemNode extends CraftingNode
return false
_checkValidity: ->
return true unless @children.length > 0
for child in @children
return true if child.isValid
return false
# Object Overrides #############################################################################