CrazyDave1/Troll-Hunter — pull request #74 by scmx (2014-03-22 11:23:11+00:00)
Title: Add goals

Add Goal to encapsulate a goal for a Level
Goal#done is a function that checks if it is achieved
Goal#done.call(level) must be called like this,
otherwise this wont be a reference to the level.

Add levelGoalsMixin which extends Level to handle goals
Level#addGoal(message, function(){}) creates a new goal
Level#goalsFulfilled() now returns false when there are no goals
Level#goalsFulfilled() calls Goal#done as mentioned above