New tile queue implementation (heapify-powered)

This commit is contained in:
Éric Lemoine
2013-01-17 16:15:03 +01:00
parent 11938d2264
commit c0c9cdef15
4 changed files with 235 additions and 18 deletions
+6
View File
@@ -4,6 +4,12 @@ beforeEach(function() {
toBeA: function(type) {
return this.actual instanceof type;
},
toBeGreaterThanOrEqualTo: function(other) {
return this.actual >= other;
},
toBeLessThanOrEqualTo: function(other) {
return this.actual <= other;
},
toRoughlyEqual: function(other, tol) {
return Math.abs(this.actual - other) <= tol;
}