1 tr
.models
.Radar = function() {
4 quadrants
= { I
: null, II
: null, III
: null, IV
: null };
7 self
.setFirstQuadrant = function (quadrant
) {
8 quadrants
.I
= quadrant
;
11 self
.setSecondQuadrant = function (quadrant
) {
12 quadrants
.II
= quadrant
;
15 self
.setThirdQuadrant = function (quadrant
) {
16 quadrants
.III
= quadrant
;
19 self
.setFourthQuadrant = function (quadrant
) {
20 quadrants
.IV
= quadrant
;
23 function allQuadrants() {
26 for (var p
in quadrants
) {
27 if (quadrants
.hasOwnProperty(p
) && quadrants
[p
] != null) {
28 all
.push(quadrants
[p
]);
36 return allQuadrants().reduce(function (blips
, quadrant
) {
37 return blips
.concat(quadrant
.blips());
41 self
.cycles = function () {
42 var cycleHash
, cycleArray
;
47 allBlips().forEach(function (blip
) {
48 cycleHash
[blip
.cycle().name()] = blip
.cycle();
51 for (var p
in cycleHash
) {
52 if (cycleHash
.hasOwnProperty(p
)) {
53 cycleArray
.push(cycleHash
[p
]);
57 return cycleArray
.slice(0);
60 self
.quadrants = function () {