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 InventoryNode extends CraftingNode
@::ENTER_METHOD = 'onEnterInventoryNode'
@::LEAVE_METHOD = 'onLeaveInventoryNode'
@::TYPE = CraftingNode::TYPES.INVENTORY
constructor: (options={})->
if not options.inventory? then throw new Error 'options.inventory is required'
@@ -38,6 +39,7 @@ module.exports = class InventoryNode extends CraftingNode
_checkValidity: ->
for child in @children
return false unless child.isValid
return true
# Object Overrides #############################################################################