Skip to content
This repository
Browse code

Coloring and distribution view

  • Loading branch information...
commit d6691829a86ffd533d93daae3f2f854271cca769 1 parent 3c45fc7
devin chalmers authored October 22, 2009
7  plugins/Packard Bugs/BugNeighborhoodView.h
@@ -4,14 +4,17 @@
4 4
  */
5 5
 
6 6
 #import <Cocoa/Cocoa.h>
7  
-#import "BugsController.h"
  7
+
  8
+#import "BugsColoringWindowController.h"
8 9
 
9 10
 @interface BugNeighborhoodView : NSControl {
10 11
 	int neighborhoodCode;
11 12
 	NSRect rects[5];
12  
-	IBOutlet id controller;
  13
+	IBOutlet BugsColoringWindowController *controller;
13 14
 	bool enabled;
14 15
 }
  16
+
15 17
 @property(assign, readwrite) bool enabled;
16 18
 @property(assign, readwrite) int neighborhoodCode;
  19
+
17 20
 @end
3  plugins/Packard Bugs/BugNeighborhoodView.m
@@ -63,8 +63,7 @@ - (void)mouseDown:(NSEvent *)theEvent {
63 63
 	}
64 64
 	[self setNeedsDisplay:YES];
65 65
 	
66  
-//	((BugsController *)controller).observedGene = neighborhoodCode;
67  
-//	[controller redrawDisplay];
  66
+	[controller setGene:neighborhoodCode];
68 67
 }
69 68
 
70 69
 //- (id)initWithCoder:(NSCoder *)decoder;
6  plugins/Packard Bugs/BugsColoringWindowController.h
@@ -17,10 +17,14 @@
17 17
 	
18 18
 	IBOutlet GeneDistributionView *distributionView;
19 19
 	IBOutlet BugNeighborhoodView *neighborhoodView;
  20
+	
  21
+	NSDate *lastDistributionDisplay;
20 22
 }
21 23
 
22 24
 @property (nonatomic, retain) BugsController *controller;
  25
+@property (nonatomic, retain) NSDate *lastDistributionDisplay;
23 26
 
24  
-- (IBAction)setGene:(id)sender;
  27
+- (void)setGene:(int)newGene;
  28
+- (void)updateDistributionView;
25 29
 
26 30
 @end
39  plugins/Packard Bugs/BugsColoringWindowController.m
@@ -15,13 +15,44 @@
15 15
 @implementation BugsColoringWindowController
16 16
 
17 17
 @synthesize controller;
  18
+@synthesize lastDistributionDisplay;
18 19
 
19  
-- (IBAction)setGene:(id)sender;
  20
+- (void)dealloc;
20 21
 {
21  
-	NSLog(@"Coloring by %d", neighborhoodView.neighborhoodCode);
22  
-	((BugsController *)controller).observedGene = neighborhoodView.neighborhoodCode;
23  
-	[controller redrawDisplay];
  22
+	[lastDistributionDisplay release], lastDistributionDisplay = nil;
  23
+	[controller release], controller = nil;
  24
+	
  25
+	[super dealloc];
  26
+}
  27
+
  28
+- (void)setGene:(int)newGene;
  29
+{
  30
+	controller.observedGene = newGene;
  31
+	distributionView.gene = newGene;
  32
+	[self updateDistributionView];
  33
+}
  34
+
  35
+- (void)awakeFromNib;
  36
+{
  37
+	self.lastDistributionDisplay = [NSDate date];
  38
+	[controller.world addObserver:self forKeyPath:@"ticks" options:NSKeyValueObservingOptionNew context:nil];
  39
+}
  40
+
  41
+- (void)updateDistributionView;
  42
+{
  43
+	distributionView.bugs = controller.world.bugs;
24 44
 	[distributionView setNeedsDisplay:YES];
  45
+	self.lastDistributionDisplay = [NSDate date];
  46
+}
  47
+
  48
+- (void)observeValueForKeyPath:(NSString *)keyPath
  49
+					  ofObject:(id)object
  50
+                        change:(NSDictionary *)change
  51
+                       context:(void *)context
  52
+{
  53
+	if ([keyPath isEqual:@"ticks"] && [[NSDate date] timeIntervalSinceDate:self.lastDistributionDisplay] > 0.5) {
  54
+		[self updateDistributionView];
  55
+	}
25 56
 }
26 57
 
27 58
 @end
49  plugins/Packard Bugs/BugsColoringWindowController.xib
@@ -12,7 +12,7 @@
12 12
 		</object>
13 13
 		<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
14 14
 			<bool key="EncodedWithXMLCoder">YES</bool>
15  
-			<integer value="29"/>
  15
+			<integer value="36"/>
16 16
 		</object>
17 17
 		<object class="NSArray" key="IBDocument.PluginDependencies">
18 18
 			<bool key="EncodedWithXMLCoder">YES</bool>
@@ -87,7 +87,6 @@
87 87
 													<int key="NSvFlags">268</int>
88 88
 													<string key="NSFrame">{{7, 8}, {97, 17}}</string>
89 89
 													<reference key="NSSuperview" ref="581891850"/>
90  
-													<reference key="NSWindow"/>
91 90
 													<bool key="NSEnabled">YES</bool>
92 91
 													<object class="NSTextFieldCell" key="NSCell" id="967921939">
93 92
 														<int key="NSCellFlags">67239488</int>
@@ -124,7 +123,6 @@
124 123
 													<int key="NSvFlags">268</int>
125 124
 													<string key="NSFrame">{{109, 0}, {32, 32}}</string>
126 125
 													<reference key="NSSuperview" ref="581891850"/>
127  
-													<reference key="NSWindow"/>
128 126
 													<string key="NSClassName">BugNeighborhoodView</string>
129 127
 												</object>
130 128
 												<object class="NSTextField" id="460915021">
@@ -132,7 +130,6 @@
132 130
 													<int key="NSvFlags">268</int>
133 131
 													<string key="NSFrame">{{149, 8}, {35, 15}}</string>
134 132
 													<reference key="NSSuperview" ref="581891850"/>
135  
-													<reference key="NSWindow"/>
136 133
 													<bool key="NSEnabled">YES</bool>
137 134
 													<object class="NSTextFieldCell" key="NSCell" id="103122001">
138 135
 														<int key="NSCellFlags">71433792</int>
@@ -153,12 +150,10 @@
153 150
 											</object>
154 151
 											<string key="NSFrameSize">{188, 32}</string>
155 152
 											<reference key="NSSuperview" ref="272764698"/>
156  
-											<reference key="NSWindow"/>
157 153
 										</object>
158 154
 									</object>
159 155
 									<string key="NSFrame">{{0, 14}, {188, 32}}</string>
160 156
 									<reference key="NSSuperview"/>
161  
-									<reference key="NSWindow"/>
162 157
 									<string key="NSOffsets">{0, 0}</string>
163 158
 									<object class="NSTextFieldCell" key="NSTitleCell">
164 159
 										<int key="NSCellFlags">67239424</int>
@@ -298,12 +293,36 @@
298 293
 					<int key="connectionID">43</int>
299 294
 				</object>
300 295
 				<object class="IBConnectionRecord">
301  
-					<object class="IBActionConnection" key="connection">
302  
-						<string key="label">setGene:</string>
  296
+					<object class="IBOutletConnection" key="connection">
  297
+						<string key="label">controller</string>
  298
+						<reference key="source" ref="511287409"/>
  299
+						<reference key="destination" ref="1001"/>
  300
+					</object>
  301
+					<int key="connectionID">45</int>
  302
+				</object>
  303
+				<object class="IBConnectionRecord">
  304
+					<object class="IBOutletConnection" key="connection">
  305
+						<string key="label">distributionView</string>
303 306
 						<reference key="source" ref="1001"/>
304  
-						<reference key="destination" ref="511287409"/>
  307
+						<reference key="destination" ref="395324607"/>
  308
+					</object>
  309
+					<int key="connectionID">46</int>
  310
+				</object>
  311
+				<object class="IBConnectionRecord">
  312
+					<object class="IBBindingConnection" key="connection">
  313
+						<string key="label">value: controller.observedGene</string>
  314
+						<reference key="source" ref="460915021"/>
  315
+						<reference key="destination" ref="1001"/>
  316
+						<object class="NSNibBindingConnector" key="connector">
  317
+							<reference key="NSSource" ref="460915021"/>
  318
+							<reference key="NSDestination" ref="1001"/>
  319
+							<string key="NSLabel">value: controller.observedGene</string>
  320
+							<string key="NSBinding">value</string>
  321
+							<string key="NSKeyPath">controller.observedGene</string>
  322
+							<int key="NSNibBindingConnectorVersion">2</int>
  323
+						</object>
305 324
 					</object>
306  
-					<int key="connectionID">44</int>
  325
+					<int key="connectionID">48</int>
307 326
 				</object>
308 327
 			</object>
309 328
 			<object class="IBMutableOrderedSet" key="objectRecords">
@@ -464,7 +483,7 @@
464 483
 					<string>{{586, 488}, {310, 310}}</string>
465 484
 					<real value="0.0"/>
466 485
 					<string>{{220, 200}, {310, 310}}</string>
467  
-					<string>{{433, 798}, {616, 0}}</string>
  486
+					<string>{{433, 629}, {616, 169}}</string>
468 487
 					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
469 488
 					<string>{{67, 510}, {616, 0}}</string>
470 489
 					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
@@ -495,7 +514,7 @@
495 514
 				</object>
496 515
 			</object>
497 516
 			<nil key="sourceID"/>
498  
-			<int key="maxID">44</int>
  517
+			<int key="maxID">48</int>
499 518
 		</object>
500 519
 		<object class="IBClassDescriber" key="IBDocument.Classes">
501 520
 			<object class="NSMutableArray" key="referencedPartialClassDescriptions">
@@ -505,7 +524,7 @@
505 524
 					<string key="superclassName">NSControl</string>
506 525
 					<object class="NSMutableDictionary" key="outlets">
507 526
 						<string key="NS.key.0">controller</string>
508  
-						<string key="NS.object.0">id</string>
  527
+						<string key="NS.object.0">BugsColoringWindowController</string>
509 528
 					</object>
510 529
 					<object class="IBClassDescriptionSource" key="sourceIdentifier">
511 530
 						<string key="majorKey">IBProjectSource</string>
@@ -515,10 +534,6 @@
515 534
 				<object class="IBPartialClassDescription">
516 535
 					<string key="className">BugsColoringWindowController</string>
517 536
 					<string key="superclassName">NSWindowController</string>
518  
-					<object class="NSMutableDictionary" key="actions">
519  
-						<string key="NS.key.0">setGene:</string>
520  
-						<string key="NS.object.0">id</string>
521  
-					</object>
522 537
 					<object class="NSMutableDictionary" key="outlets">
523 538
 						<bool key="EncodedWithXMLCoder">YES</bool>
524 539
 						<object class="NSArray" key="dict.sortedKeys">
9  plugins/Packard Bugs/BugsController.m
@@ -72,6 +72,7 @@ - (void)dealloc;
72 72
 {
73 73
 	[world release];
74 74
 	[statistics release];
  75
+	[view release];
75 76
 	
76 77
 	[super dealloc];
77 78
 }
@@ -109,12 +110,20 @@ - (id)statisticsCollector;
109 110
 	return statistics;
110 111
 }
111 112
 
  113
+- (void)setObservedGene:(int)newObservedGene;
  114
+{
  115
+	observedGene = newObservedGene;
  116
+	self.view.colorGene = observedGene;
  117
+	[self.view setNeedsDisplay:YES];
  118
+}
  119
+
112 120
 #pragma mark -
113 121
 
114 122
 - (void)showColorWindow;
115 123
 {
116 124
 	if (!coloringWindowController) {
117 125
 		coloringWindowController = [[BugsColoringWindowController alloc] initWithWindowNibName:@"BugsColoringWindowController"];
  126
+		coloringWindowController.controller = self;
118 127
 	}
119 128
 	[coloringWindowController.window makeKeyAndOrderFront:self];
120 129
 }
5  plugins/Packard Bugs/GeneDistributionView.h
@@ -19,8 +19,13 @@
19 19
 	int gene;
20 20
 	bool needsRedisplay;
21 21
 	int geneCounts[31][31];
  22
+	
  23
+	NSSet *bugs;
22 24
 }
23 25
 
24 26
 - (void)timerTick:(NSTimer *)theTimer;
25 27
 
  28
+@property (nonatomic, retain) NSSet *bugs;
  29
+@property (nonatomic, assign) int gene;
  30
+
26 31
 @end
75  plugins/Packard Bugs/GeneDistributionView.m
@@ -8,9 +8,13 @@
8 8
 
9 9
 #import "GeneDistributionView.h"
10 10
 
  11
+#import "Bug.h"
11 12
 
12 13
 @implementation GeneDistributionView
13 14
 
  15
+@synthesize bugs;
  16
+@synthesize gene;
  17
+
14 18
 - (id)initWithFrame:(NSRect)frame;
15 19
 {
16 20
 	if (!(self = [super initWithFrame:frame]))
@@ -33,61 +37,32 @@ - (void)timerTick:(NSTimer *)theTimer;
33 37
 	}
34 38
 }
35 39
 
36  
-//- (void)awakeFromNib;
37  
-//{
38  
-//	[controller addObserver:self
39  
-//				 forKeyPath:@"world.ticks"
40  
-//					options:NSKeyValueObservingOptionNew
41  
-//					context:NULL];
42  
-//	
43  
-////	[controller addObserver:self
44  
-////				 forKeyPath:@"observedGene"
45  
-////					options:NSKeyValueObservingOptionNew
46  
-////					context:NULL];
47  
-//}
48  
-
49  
-- (void)observeValueForKeyPath:(NSString *)keyPath
50  
-					  ofObject:(id)object
51  
-                        change:(NSDictionary *)change
52  
-                       context:(void *)context
53  
-{
54  
-//    if ([keyPath isEqual:@"observedGene"]) {
55  
-//		[[change objectForKey:NSKeyValueChangeNewKey] getValue:&gene];
56  
-//		[self setNeedsDisplay:YES];
57  
-//	} else {
58  
-		needsRedisplay = true;
59  
-//	}
60  
-}
61  
-
62 40
 - (void)drawRect:(NSRect)rect;
63 41
 {
64  
-//	int i, j;
65  
-//	float rectWidth = [self frame].size.width / 31.0;
66  
-//	float rectHeight = [self frame].size.height / 31.0;
67  
-//	Bug *bug;
68  
-//	BugMovement movement;
69  
-//	for (NSMutableArray *row in controller.world.grid) {
70  
-//		for (Cell *cell in row) {
71  
-//			if (bug = cell.bug) {
72  
-//				movement = [bug getMovementForGene:gene];
73  
-//				geneCounts[movement.x + 15][movement.y + 15] += 1;
74  
-//			}
75  
-//		}
76  
-//	}
  42
+	int i, j;
  43
+	float rectWidth = [self frame].size.width / 31.0;
  44
+	float rectHeight = [self frame].size.height / 31.0;
  45
+	
  46
+	for (Bug *bug in self.bugs) {
  47
+		BugMovement movement = [bug getMovementForGene:gene];
  48
+		geneCounts[movement.x + 15][movement.y + 15] += 1;
  49
+	}
  50
+	
77 51
 	// draw gene count distribution
78 52
 	int rectCount = 0;
79  
-//	int population = controller.world.population;
  53
+	int population = [self.bugs count];
  54
+	NSLog(@"%d bugs", population);
80 55
 	NSRect geneRects[120];
81  
-//	for (i = 0; i < 31; i++) {
82  
-//		for (j = 0; j < 31; j++) {
83  
-//			if (geneCounts[i][j] > 0) {
84  
-//				float rectSize = log2(geneCounts[i][j] * 120.0 / population + 1) + 1;
85  
-//				geneRects[rectCount] = NSMakeRect(rectWidth * i - (rectSize - rectWidth)/2, rectHeight * j - (rectSize - rectWidth)/2, rectSize, rectSize);
86  
-//				rectCount++;
87  
-//			}
88  
-//			geneCounts[i][j] = 0; // reset count to 0 for next count
89  
-//		}
90  
-//	}
  56
+	for (i = 0; i < 31; i++) {
  57
+		for (j = 0; j < 31; j++) {
  58
+			if (geneCounts[i][j] > 0) {
  59
+				float rectSize = log2(geneCounts[i][j] * 120.0 / population + 1) + 1;
  60
+				geneRects[rectCount] = NSMakeRect(rectWidth * i - (rectSize - rectWidth)/2, rectHeight * j - (rectSize - rectWidth)/2, rectSize, rectSize);
  61
+				rectCount++;
  62
+			}
  63
+			geneCounts[i][j] = 0; // reset count to 0 for next count
  64
+		}
  65
+	}
91 66
 	[[NSColor colorWithDeviceWhite:0.0 alpha:0.5] set];
92 67
 	NSRectFillList(geneRects, rectCount);
93 68
 	needsRedisplay = false;
611  plugins/Packard Bugs/Packard Bugs Plugin.xcodeproj/d.pbxuser
@@ -70,24 +70,6 @@
70 70
 		vrLen = 1251;
71 71
 		vrLoc = 859;
72 72
 	};
73  
-	035AF13A1090223B00725226 /* World.m:74 */ = {
74  
-		isa = PBXFileBreakpoint;
75  
-		actions = (
76  
-		);
77  
-		breakpointStyle = 0;
78  
-		continueAfterActions = 0;
79  
-		countType = 0;
80  
-		delayBeforeContinue = 0;
81  
-		fileReference = 03E2CCC30E2729460077196A /* World.m */;
82  
-		functionName = "-setFoodImage:";
83  
-		hitCount = 1;
84  
-		ignoreCount = 0;
85  
-		lineNumber = 74;
86  
-		location = "Packard Bugs Plugin";
87  
-		modificationTime = 277883002.854411;
88  
-		originalNumberOfMultipleMatches = 1;
89  
-		state = 1;
90  
-	};
91 73
 	035AF1461090225400725226 /* PBXTextBookmark */ = {
92 74
 		isa = PBXTextBookmark;
93 75
 		fRef = 03E2CCC30E2729460077196A /* World.m */;
@@ -189,6 +171,466 @@
189 171
 		vrLen = 1345;
190 172
 		vrLoc = 725;
191 173
 	};
  174
+	035AF3091090480700725226 /* PBXTextBookmark */ = {
  175
+		isa = PBXTextBookmark;
  176
+		fRef = 0381D66E1086827D00072A80 /* BugsColoringWindowController.m */;
  177
+		name = "BugsColoringWindowController.m: 21";
  178
+		rLen = 0;
  179
+		rLoc = 596;
  180
+		rType = 0;
  181
+		vrLen = 633;
  182
+		vrLoc = 0;
  183
+	};
  184
+	035AF30A1090480700725226 /* PBXTextBookmark */ = {
  185
+		isa = PBXTextBookmark;
  186
+		fRef = 0381D6601086814600072A80 /* BugNeighborhoodView.h */;
  187
+		name = "BugNeighborhoodView.h: 1";
  188
+		rLen = 0;
  189
+		rLoc = 0;
  190
+		rType = 0;
  191
+		vrLen = 364;
  192
+		vrLoc = 0;
  193
+	};
  194
+	035AF30B1090480700725226 /* PBXTextBookmark */ = {
  195
+		isa = PBXTextBookmark;
  196
+		fRef = 0381D6611086814600072A80 /* BugNeighborhoodView.m */;
  197
+		name = "BugNeighborhoodView.m: 40";
  198
+		rLen = 0;
  199
+		rLoc = 1141;
  200
+		rType = 0;
  201
+		vrLen = 844;
  202
+		vrLoc = 1088;
  203
+	};
  204
+	035AF30C1090480700725226 /* PBXTextBookmark */ = {
  205
+		isa = PBXTextBookmark;
  206
+		fRef = 0381D6611086814600072A80 /* BugNeighborhoodView.m */;
  207
+		name = "BugNeighborhoodView.m: 40";
  208
+		rLen = 0;
  209
+		rLoc = 1141;
  210
+		rType = 0;
  211
+		vrLen = 845;
  212
+		vrLoc = 1087;
  213
+	};
  214
+	035AF317109048AE00725226 /* PBXTextBookmark */ = {
  215
+		isa = PBXTextBookmark;
  216
+		fRef = 0381D6601086814600072A80 /* BugNeighborhoodView.h */;
  217
+		name = "BugNeighborhoodView.h: 13";
  218
+		rLen = 0;
  219
+		rLoc = 278;
  220
+		rType = 0;
  221
+		vrLen = 408;
  222
+		vrLoc = 0;
  223
+	};
  224
+	035AF318109048AE00725226 /* PBXTextBookmark */ = {
  225
+		isa = PBXTextBookmark;
  226
+		fRef = 0381D6611086814600072A80 /* BugNeighborhoodView.m */;
  227
+		name = "BugNeighborhoodView.m: 66";
  228
+		rLen = 0;
  229
+		rLoc = 1679;
  230
+		rType = 0;
  231
+		vrLen = 787;
  232
+		vrLoc = 1087;
  233
+	};
  234
+	035AF319109048AE00725226 /* PBXTextBookmark */ = {
  235
+		isa = PBXTextBookmark;
  236
+		fRef = 0381D66D1086827D00072A80 /* BugsColoringWindowController.h */;
  237
+		name = "BugsColoringWindowController.h: 24";
  238
+		rLen = 30;
  239
+		rLoc = 631;
  240
+		rType = 0;
  241
+		vrLen = 568;
  242
+		vrLoc = 0;
  243
+	};
  244
+	035AF31A109048AE00725226 /* PBXTextBookmark */ = {
  245
+		isa = PBXTextBookmark;
  246
+		fRef = 0381D66E1086827D00072A80 /* BugsColoringWindowController.m */;
  247
+		name = "BugsColoringWindowController.m: 21";
  248
+		rLen = 0;
  249
+		rLoc = 630;
  250
+		rType = 0;
  251
+		vrLen = 543;
  252
+		vrLoc = 0;
  253
+	};
  254
+	035AF32E109049E700725226 /* PBXTextBookmark */ = {
  255
+		isa = PBXTextBookmark;
  256
+		fRef = 03E2CCC20E2729460077196A /* World.h */;
  257
+		name = "World.h: 45";
  258
+		rLen = 0;
  259
+		rLoc = 848;
  260
+		rType = 0;
  261
+		vrLen = 1090;
  262
+		vrLoc = 177;
  263
+	};
  264
+	035AF32F109049E700725226 /* PBXTextBookmark */ = {
  265
+		isa = PBXTextBookmark;
  266
+		fRef = 03E2CCB80E2729340077196A /* WorldView.h */;
  267
+		name = "WorldView.h: 21";
  268
+		rLen = 0;
  269
+		rLoc = 360;
  270
+		rType = 0;
  271
+		vrLen = 367;
  272
+		vrLoc = 0;
  273
+	};
  274
+	035AF330109049E700725226 /* PBXTextBookmark */ = {
  275
+		isa = PBXTextBookmark;
  276
+		fRef = 03E2CCB90E2729340077196A /* WorldView.m */;
  277
+		name = "WorldView.m: 18";
  278
+		rLen = 0;
  279
+		rLoc = 284;
  280
+		rType = 0;
  281
+		vrLen = 649;
  282
+		vrLoc = 0;
  283
+	};
  284
+	035AF331109049E700725226 /* PBXTextBookmark */ = {
  285
+		isa = PBXTextBookmark;
  286
+		fRef = 03E2CD740E272F910077196A /* BugsController.h */;
  287
+		name = "BugsController.h: 21";
  288
+		rLen = 0;
  289
+		rLoc = 448;
  290
+		rType = 0;
  291
+		vrLen = 760;
  292
+		vrLoc = 0;
  293
+	};
  294
+	035AF332109049E700725226 /* PBXTextBookmark */ = {
  295
+		isa = PBXTextBookmark;
  296
+		fRef = 03E2CD750E272F910077196A /* BugsController.m */;
  297
+		name = "BugsController.m: 87";
  298
+		rLen = 0;
  299
+		rLoc = 2152;
  300
+		rType = 0;
  301
+		vrLen = 615;
  302
+		vrLoc = 1926;
  303
+	};
  304
+	035AF333109049E700725226 /* PBXTextBookmark */ = {
  305
+		isa = PBXTextBookmark;
  306
+		fRef = 0381D66E1086827D00072A80 /* BugsColoringWindowController.m */;
  307
+		name = "BugsColoringWindowController.m: 21";
  308
+		rLen = 0;
  309
+		rLoc = 630;
  310
+		rType = 0;
  311
+		vrLen = 543;
  312
+		vrLoc = 0;
  313
+	};
  314
+	035AF334109049E700725226 /* PBXTextBookmark */ = {
  315
+		isa = PBXTextBookmark;
  316
+		fRef = 0381D66E1086827D00072A80 /* BugsColoringWindowController.m */;
  317
+		name = "BugsColoringWindowController.m: 21";
  318
+		rLen = 0;
  319
+		rLoc = 630;
  320
+		rType = 0;
  321
+		vrLen = 543;
  322
+		vrLoc = 0;
  323
+	};
  324
+	035AF34010904AA300725226 /* PBXTextBookmark */ = {
  325
+		isa = PBXTextBookmark;
  326
+		fRef = 03E2CD750E272F910077196A /* BugsController.m */;
  327
+		name = "BugsController.m: 117";
  328
+		rLen = 0;
  329
+		rLoc = 2592;
  330
+		rType = 0;
  331
+		vrLen = 651;
  332
+		vrLoc = 2024;
  333
+	};
  334
+	035AF34110904AA300725226 /* PBXTextBookmark */ = {
  335
+		isa = PBXTextBookmark;
  336
+		fRef = 0381D66E1086827D00072A80 /* BugsColoringWindowController.m */;
  337
+		name = "BugsColoringWindowController.m: 21";
  338
+		rLen = 0;
  339
+		rLoc = 630;
  340
+		rType = 0;
  341
+		vrLen = 543;
  342
+		vrLoc = 0;
  343
+	};
  344
+	035AF34210904AA300725226 /* PBXTextBookmark */ = {
  345
+		isa = PBXTextBookmark;
  346
+		fRef = 0381D66E1086827D00072A80 /* BugsColoringWindowController.m */;
  347
+		name = "BugsColoringWindowController.m: 22";
  348
+		rLen = 0;
  349
+		rLoc = 666;
  350
+		rType = 0;
  351
+		vrLen = 514;
  352
+		vrLoc = 0;
  353
+	};
  354
+	035AF34710904AC200725226 /* PBXTextBookmark */ = {
  355
+		isa = PBXTextBookmark;
  356
+		fRef = 0381D66E1086827D00072A80 /* BugsColoringWindowController.m */;
  357
+		name = "BugsColoringWindowController.m: 21";
  358
+		rLen = 0;
  359
+		rLoc = 596;
  360
+		rType = 0;
  361
+		vrLen = 547;
  362
+		vrLoc = 0;
  363
+	};
  364
+	035AF34F10904B0000725226 /* PBXTextBookmark */ = {
  365
+		isa = PBXTextBookmark;
  366
+		fRef = 03E2CCB90E2729340077196A /* WorldView.m */;
  367
+		name = "WorldView.m: 76";
  368
+		rLen = 0;
  369
+		rLoc = 1267;
  370
+		rType = 0;
  371
+		vrLen = 649;
  372
+		vrLoc = 0;
  373
+	};
  374
+	035AF35010904B0000725226 /* PBXTextBookmark */ = {
  375
+		isa = PBXTextBookmark;
  376
+		fRef = 03E2CCB80E2729340077196A /* WorldView.h */;
  377
+		name = "WorldView.h: 21";
  378
+		rLen = 0;
  379
+		rLoc = 360;
  380
+		rType = 0;
  381
+		vrLen = 367;
  382
+		vrLoc = 0;
  383
+	};
  384
+	035AF35110904B0000725226 /* PBXTextBookmark */ = {
  385
+		isa = PBXTextBookmark;
  386
+		fRef = 0381D66D1086827D00072A80 /* BugsColoringWindowController.h */;
  387
+		name = "BugsColoringWindowController.h: 24";
  388
+		rLen = 30;
  389
+		rLoc = 631;
  390
+		rType = 0;
  391
+		vrLen = 568;
  392
+		vrLoc = 0;
  393
+	};
  394
+	035AF35210904B0000725226 /* PBXTextBookmark */ = {
  395
+		isa = PBXTextBookmark;
  396
+		fRef = 0381D66E1086827D00072A80 /* BugsColoringWindowController.m */;
  397
+		name = "BugsColoringWindowController.m: 21";
  398
+		rLen = 0;
  399
+		rLoc = 596;
  400
+		rType = 0;
  401
+		vrLen = 547;
  402
+		vrLoc = 0;
  403
+	};
  404
+	035AF35310904B0000725226 /* PBXTextBookmark */ = {
  405
+		isa = PBXTextBookmark;
  406
+		fRef = 03E2CD750E272F910077196A /* BugsController.m */;
  407
+		name = "BugsController.m: 117";
  408
+		rLen = 0;
  409
+		rLoc = 2592;
  410
+		rType = 0;
  411
+		vrLen = 651;
  412
+		vrLoc = 2024;
  413
+	};
  414
+	035AF35410904B0000725226 /* PBXTextBookmark */ = {
  415
+		isa = PBXTextBookmark;
  416
+		fRef = 03E2CD750E272F910077196A /* BugsController.m */;
  417
+		name = "BugsController.m: 126";
  418
+		rLen = 0;
  419
+		rLoc = 2843;
  420
+		rType = 0;
  421
+		vrLen = 762;
  422
+		vrLoc = 2155;
  423
+	};
  424
+	035AF35610904B2800725226 /* PBXTextBookmark */ = {
  425
+		isa = PBXTextBookmark;
  426
+		fRef = 03E2CD750E272F910077196A /* BugsController.m */;
  427
+		name = "BugsController.m: 126";
  428
+		rLen = 0;
  429
+		rLoc = 2843;
  430
+		rType = 0;
  431
+		vrLen = 762;
  432
+		vrLoc = 2155;
  433
+	};
  434
+	035AF35710904B2800725226 /* PBXTextBookmark */ = {
  435
+		isa = PBXTextBookmark;
  436
+		fRef = 03E2CCB90E2729340077196A /* WorldView.m */;
  437
+		name = "WorldView.m: 75";
  438
+		rLen = 0;
  439
+		rLoc = 1267;
  440
+		rType = 0;
  441
+		vrLen = 1459;
  442
+		vrLoc = 819;
  443
+	};
  444
+	035AF36810904DFE00725226 /* PBXTextBookmark */ = {
  445
+		isa = PBXTextBookmark;
  446
+		fRef = 03E2CCB90E2729340077196A /* WorldView.m */;
  447
+		name = "WorldView.m: 93";
  448
+		rLen = 0;
  449
+		rLoc = 1764;
  450
+		rType = 0;
  451
+		vrLen = 1478;
  452
+		vrLoc = 1059;
  453
+	};
  454
+	035AF36910904DFE00725226 /* PBXTextBookmark */ = {
  455
+		isa = PBXTextBookmark;
  456
+		fRef = 03E2CCC20E2729460077196A /* World.h */;
  457
+		name = "World.h: 45";
  458
+		rLen = 0;
  459
+		rLoc = 848;
  460
+		rType = 0;
  461
+		vrLen = 1094;
  462
+		vrLoc = 137;
  463
+	};
  464
+	035AF36A10904DFE00725226 /* PBXTextBookmark */ = {
  465
+		isa = PBXTextBookmark;
  466
+		fRef = 0381D6631086816700072A80 /* GeneDistributionView.h */;
  467
+		name = "GeneDistributionView.h: 28";
  468
+		rLen = 0;
  469
+		rLoc = 554;
  470
+		rType = 0;
  471
+		vrLen = 521;
  472
+		vrLoc = 0;
  473
+	};
  474
+	035AF36B10904DFE00725226 /* PBXTextBookmark */ = {
  475
+		isa = PBXTextBookmark;
  476
+		fRef = 0381D6641086816700072A80 /* GeneDistributionView.m */;
  477
+		name = "GeneDistributionView.m: 52";
  478
+		rLen = 1;
  479
+		rLoc = 832;
  480
+		rType = 0;
  481
+		vrLen = 1156;
  482
+		vrLoc = 688;
  483
+	};
  484
+	035AF36C10904DFE00725226 /* PBXTextBookmark */ = {
  485
+		isa = PBXTextBookmark;
  486
+		fRef = 0381D66D1086827D00072A80 /* BugsColoringWindowController.h */;
  487
+		name = "BugsColoringWindowController.h: 25";
  488
+		rLen = 0;
  489
+		rLoc = 629;
  490
+		rType = 0;
  491
+		vrLen = 667;
  492
+		vrLoc = 0;
  493
+	};
  494
+	035AF36D10904DFE00725226 /* PBXTextBookmark */ = {
  495
+		isa = PBXTextBookmark;
  496
+		fRef = 0381D66E1086827D00072A80 /* BugsColoringWindowController.m */;
  497
+		name = "BugsColoringWindowController.m: 22";
  498
+		rLen = 0;
  499
+		rLoc = 560;
  500
+		rType = 0;
  501
+		vrLen = 1196;
  502
+		vrLoc = 0;
  503
+	};
  504
+	035AF36E10904DFE00725226 /* PBXTextBookmark */ = {
  505
+		isa = PBXTextBookmark;
  506
+		fRef = 0381D66E1086827D00072A80 /* BugsColoringWindowController.m */;
  507
+		name = "BugsColoringWindowController.m: 18";
  508
+		rLen = 0;
  509
+		rLoc = 412;
  510
+		rType = 0;
  511
+		vrLen = 1133;
  512
+		vrLoc = 170;
  513
+	};
  514
+	035AF37310904E5C00725226 /* PBXTextBookmark */ = {
  515
+		isa = PBXTextBookmark;
  516
+		fRef = 0381D66D1086827D00072A80 /* BugsColoringWindowController.h */;
  517
+		name = "BugsColoringWindowController.h: 29";
  518
+		rLen = 0;
  519
+		rLoc = 693;
  520
+		rType = 0;
  521
+		vrLen = 699;
  522
+		vrLoc = 0;
  523
+	};
  524
+	035AF37410904E5C00725226 /* PBXTextBookmark */ = {
  525
+		isa = PBXTextBookmark;
  526
+		fRef = 0381D66E1086827D00072A80 /* BugsColoringWindowController.m */;
  527
+		name = "BugsColoringWindowController.m: 41";
  528
+		rLen = 32;
  529
+		rLoc = 882;
  530
+		rType = 0;
  531
+		vrLen = 1173;
  532
+		vrLoc = 240;
  533
+	};
  534
+	035AF37510904E5C00725226 /* PBXTextBookmark */ = {
  535
+		isa = PBXTextBookmark;
  536
+		fRef = 0381D66E1086827D00072A80 /* BugsColoringWindowController.m */;
  537
+		name = "BugsColoringWindowController.m: 32";
  538
+		rLen = 0;
  539
+		rLoc = 697;
  540
+		rType = 0;
  541
+		vrLen = 1190;
  542
+		vrLoc = 212;
  543
+	};
  544
+	035AF37A10904E8600725226 /* PBXTextBookmark */ = {
  545
+		isa = PBXTextBookmark;
  546
+		fRef = 0381D66E1086827D00072A80 /* BugsColoringWindowController.m */;
  547
+		name = "BugsColoringWindowController.m: 32";
  548
+		rLen = 0;
  549
+		rLoc = 697;
  550
+		rType = 0;
  551
+		vrLen = 1104;
  552
+		vrLoc = 306;
  553
+	};
  554
+	035AF37B10904E8600725226 /* PBXTextBookmark */ = {
  555
+		isa = PBXTextBookmark;
  556
+		fRef = 0381D6641086816700072A80 /* GeneDistributionView.m */;
  557
+		name = "GeneDistributionView.m: 79";
  558
+		rLen = 0;
  559
+		rLoc = 1250;
  560
+		rType = 0;
  561
+		vrLen = 1321;
  562
+		vrLoc = 1124;
  563
+	};
  564
+	035AF38110904ED000725226 /* PBXTextBookmark */ = {
  565
+		isa = PBXTextBookmark;
  566
+		fRef = 0381D6641086816700072A80 /* GeneDistributionView.m */;
  567
+		name = "GeneDistributionView.m: 79";
  568
+		rLen = 0;
  569
+		rLoc = 1248;
  570
+		rType = 0;
  571
+		vrLen = 1333;
  572
+		vrLoc = 1124;
  573
+	};
  574
+	035AF38710904F4A00725226 /* PBXTextBookmark */ = {
  575
+		isa = PBXTextBookmark;
  576
+		fRef = 0381D6631086816700072A80 /* GeneDistributionView.h */;
  577
+		name = "GeneDistributionView.h: 29";
  578
+		rLen = 0;
  579
+		rLoc = 554;
  580
+		rType = 0;
  581
+		vrLen = 561;
  582
+		vrLoc = 0;
  583
+	};
  584
+	035AF38810904F4A00725226 /* PBXTextBookmark */ = {
  585
+		isa = PBXTextBookmark;
  586
+		fRef = 0381D6641086816700072A80 /* GeneDistributionView.m */;
  587
+		name = "GeneDistributionView.m: 38";
  588
+		rLen = 0;
  589
+		rLoc = 832;
  590
+		rType = 0;
  591
+		vrLen = 1223;
  592
+		vrLoc = 572;
  593
+	};
  594
+	035AF38910904F4A00725226 /* PBXTextBookmark */ = {
  595
+		isa = PBXTextBookmark;
  596
+		fRef = 0381D66E1086827D00072A80 /* BugsColoringWindowController.m */;
  597
+		name = "BugsColoringWindowController.m: 31";
  598
+		rLen = 0;
  599
+		rLoc = 665;
  600
+		rType = 0;
  601
+		vrLen = 1106;
  602
+		vrLoc = 305;
  603
+	};
  604
+	035AF38A10904FA600725226 /* PBXTextBookmark */ = {
  605
+		isa = PBXTextBookmark;
  606
+		fRef = 0381D66D1086827D00072A80 /* BugsColoringWindowController.h */;
  607
+		name = "BugsColoringWindowController.h: 29";
  608
+		rLen = 0;
  609
+		rLoc = 693;
  610
+		rType = 0;
  611
+		vrLen = 699;
  612
+		vrLoc = 0;
  613
+	};
  614
+	035AF38B10904FA600725226 /* PBXTextBookmark */ = {
  615
+		isa = PBXTextBookmark;
  616
+		fRef = 0381D66E1086827D00072A80 /* BugsColoringWindowController.m */;
  617
+		name = "BugsColoringWindowController.m: 31";
  618
+		rLen = 0;
  619
+		rLoc = 665;
  620
+		rType = 0;
  621
+		vrLen = 1106;
  622
+		vrLoc = 305;
  623
+	};
  624
+	035AF38C10904FA600725226 /* PBXTextBookmark */ = {
  625
+		isa = PBXTextBookmark;
  626
+		fRef = 0381D66E1086827D00072A80 /* BugsColoringWindowController.m */;
  627
+		name = "BugsColoringWindowController.m: 30";
  628
+		rLen = 0;
  629
+		rLoc = 607;
  630
+		rType = 0;
  631
+		vrLen = 1086;
  632
+		vrLoc = 305;
  633
+	};
192 634
 	0381D4BB10865AF900072A80 /* PBXBookmark */ = {
193 635
 		isa = PBXBookmark;
194 636
 		fRef = 03E2CCC30E2729460077196A /* World.m */;
@@ -315,48 +757,48 @@
315 757
 	};
316 758
 	0381D6601086814600072A80 /* BugNeighborhoodView.h */ = {
317 759
 		uiCtxt = {
318  
-			sepNavIntBoundsRect = "{{0, 0}, {1059, 786}}";
319  
-			sepNavSelRange = "{352, 16}";
320  
-			sepNavVisRange = "{0, 375}";
  760
+			sepNavIntBoundsRect = "{{0, 0}, {703, 569}}";
  761
+			sepNavSelRange = "{278, 0}";
  762
+			sepNavVisRange = "{0, 408}";
321 763
 			sepNavWindowFrame = "{{37, 300}, {1118, 878}}";
322 764
 		};
323 765
 	};
324 766
 	0381D6611086814600072A80 /* BugNeighborhoodView.m */ = {
325 767
 		uiCtxt = {
326  
-			sepNavIntBoundsRect = "{{0, 0}, {929, 1001}}";
327  
-			sepNavSelRange = "{1141, 0}";
328  
-			sepNavVisRange = "{205, 1622}";
  768
+			sepNavIntBoundsRect = "{{0, 0}, {901, 1040}}";
  769
+			sepNavSelRange = "{1679, 0}";
  770
+			sepNavVisRange = "{1087, 787}";
329 771
 			sepNavWindowFrame = "{{14, 300}, {988, 878}}";
330 772
 		};
331 773
 	};
332 774
 	0381D6631086816700072A80 /* GeneDistributionView.h */ = {
333 775
 		uiCtxt = {
334  
-			sepNavIntBoundsRect = "{{0, 0}, {872, 786}}";
335  
-			sepNavSelRange = "{303, 0}";
336  
-			sepNavVisRange = "{0, 461}";
  776
+			sepNavIntBoundsRect = "{{0, 0}, {654, 580}}";
  777
+			sepNavSelRange = "{554, 0}";
  778
+			sepNavVisRange = "{0, 561}";
337 779
 			sepNavWindowFrame = "{{876, 300}, {931, 878}}";
338 780
 		};
339 781
 	};
340 782
 	0381D6641086816700072A80 /* GeneDistributionView.m */ = {
341 783
 		uiCtxt = {
342  
-			sepNavIntBoundsRect = "{{0, 0}, {1097, 1183}}";
343  
-			sepNavSelRange = "{1981, 24}";
344  
-			sepNavVisRange = "{1461, 886}";
  784
+			sepNavIntBoundsRect = "{{0, 0}, {1097, 936}}";
  785
+			sepNavSelRange = "{832, 0}";
  786
+			sepNavVisRange = "{572, 1223}";
345 787
 			sepNavWindowFrame = "{{222, 84}, {931, 900}}";
346 788
 		};
347 789
 	};
348 790
 	0381D66D1086827D00072A80 /* BugsColoringWindowController.h */ = {
349 791
 		uiCtxt = {
350  
-			sepNavIntBoundsRect = "{{0, 0}, {872, 808}}";
351  
-			sepNavSelRange = "{275, 0}";
352  
-			sepNavVisRange = "{0, 570}";
  792
+			sepNavIntBoundsRect = "{{0, 0}, {654, 580}}";
  793
+			sepNavSelRange = "{693, 0}";
  794
+			sepNavVisRange = "{0, 699}";
353 795
 		};
354 796
 	};
355 797
 	0381D66E1086827D00072A80 /* BugsColoringWindowController.m */ = {
356 798
 		uiCtxt = {
357  
-			sepNavIntBoundsRect = "{{0, 0}, {1059, 786}}";
358  
-			sepNavSelRange = "{472, 0}";
359  
-			sepNavVisRange = "{0, 633}";
  799
+			sepNavIntBoundsRect = "{{0, 0}, {803, 767}}";
  800
+			sepNavSelRange = "{607, 0}";
  801
+			sepNavVisRange = "{305, 1086}";
360 802
 			sepNavWindowFrame = "{{244, 300}, {1118, 878}}";
361 803
 		};
362 804
 	};
@@ -383,7 +825,7 @@
383 825
 		fRef = 0381D66E1086827D00072A80 /* BugsColoringWindowController.m */;
384 826
 		name = "BugsColoringWindowController.m: 21";
385 827
 		rLen = 0;
386  
-		rLoc = 553;
  828
+		rLoc = 630;
387 829
 		rType = 0;
388 830
 		vrLen = 571;
389 831
 		vrLoc = 0;
@@ -393,7 +835,7 @@
393 835
 		fRef = 03E2CD750E272F910077196A /* BugsController.m */;
394 836
 		name = "BugsController.m: 95";
395 837
 		rLen = 23;
396  
-		rLoc = 2317;
  838
+		rLoc = 2334;
397 839
 		rType = 0;
398 840
 		vrLen = 1800;
399 841
 		vrLoc = 410;
@@ -422,7 +864,7 @@
422 864
 		isa = PBXTextBookmark;
423 865
 		fRef = 03E2CD750E272F910077196A /* BugsController.m */;
424 866
 		rLen = 0;
425  
-		rLoc = 2699;
  867
+		rLoc = 2917;
426 868
 		rType = 0;
427 869
 	};
428 870
 	0381D6DA108688A400072A80 /* PBXTextBookmark */ = {
@@ -430,7 +872,7 @@
430 872
 		fRef = 0381D6641086816700072A80 /* GeneDistributionView.m */;
431 873
 		name = "GeneDistributionView.m: 43";
432 874
 		rLen = 0;
433  
-		rLoc = 781;
  875
+		rLoc = 832;
434 876
 		rType = 0;
435 877
 		vrLen = 1705;
436 878
 		vrLoc = 636;
@@ -474,7 +916,7 @@
474 916
 		fRef = 0381D66E1086827D00072A80 /* BugsColoringWindowController.m */;
475 917
 		name = "BugsColoringWindowController.m: 21";
476 918
 		rLen = 0;
477  
-		rLoc = 472;
  919
+		rLoc = 596;
478 920
 		rType = 0;
479 921
 		vrLen = 633;
480 922
 		vrLoc = 0;
@@ -484,7 +926,7 @@
484 926
 		fRef = 0381D6611086814600072A80 /* BugNeighborhoodView.m */;
485 927
 		name = "BugNeighborhoodView.m: 38";
486 928
 		rLen = 0;
487  
-		rLoc = 1141;
  929
+		rLoc = 1143;
488 930
 		rType = 0;
489 931
 		vrLen = 1626;
490 932
 		vrLoc = 205;
@@ -504,9 +946,9 @@
504 946
 		fRef = 0381D6601086814600072A80 /* BugNeighborhoodView.h */;
505 947
 		name = "BugNeighborhoodView.h: 16";
506 948
 		rLen = 16;
507  
-		rLoc = 352;
  949
+		rLoc = 384;
508 950
 		rType = 0;
509  
-		vrLen = 375;
  951
+		vrLen = 364;
510 952
 		vrLoc = 0;
511 953
 	};
512 954
 	0381D7391086C07F00072A80 /* PBXTextBookmark */ = {
@@ -625,16 +1067,16 @@
625 1067
 	};
626 1068
 	03E2CCB80E2729340077196A /* WorldView.h */ = {
627 1069
 		uiCtxt = {
628  
-			sepNavIntBoundsRect = "{{0, 0}, {519, 426}}";
629  
-			sepNavSelRange = "{238, 0}";
630  
-			sepNavVisRange = "{0, 305}";
  1070
+			sepNavIntBoundsRect = "{{0, 0}, {703, 569}}";
  1071
+			sepNavSelRange = "{360, 0}";
  1072
+			sepNavVisRange = "{0, 367}";
631 1073
 		};
632 1074
 	};
633 1075
 	03E2CCB90E2729340077196A /* WorldView.m */ = {
634 1076
 		uiCtxt = {
635  
-			sepNavIntBoundsRect = "{{0, 0}, {756, 1722}}";
636  
-			sepNavSelRange = "{801, 0}";
637  
-			sepNavVisRange = "{474, 787}";
  1077
+			sepNavIntBoundsRect = "{{0, 0}, {880, 1547}}";
  1078
+			sepNavSelRange = "{1764, 0}";
  1079
+			sepNavVisRange = "{1059, 1478}";
638 1080
 		};
639 1081
 	};
640 1082
 	03E2CCBC0E2729460077196A /* BugsStatistics.h */ = {
@@ -677,18 +1119,18 @@
677 1119
 	};
678 1120
 	03E2CCC20E2729460077196A /* World.h */ = {
679 1121
 		uiCtxt = {
680  
-			sepNavIntBoundsRect = "{{0, 0}, {713, 1014}}";
  1122
+			sepNavIntBoundsRect = "{{0, 0}, {654, 1014}}";
681 1123
 			sepNavSelRange = "{848, 0}";
682  
-			sepNavVisRange = "{74, 1526}";
  1124
+			sepNavVisRange = "{137, 1094}";
683 1125
 			sepNavWindowFrame = "{{725, 333}, {772, 837}}";
684 1126
 		};
685 1127
 	};
686 1128
 	03E2CCC30E2729460077196A /* World.m */ = {
687 1129
 		uiCtxt = {
688  
-			sepNavIntBoundsRect = "{{0, 0}, {713, 3406}}";
689  
-			sepNavSelRange = "{5408, 42}";
690  
-			sepNavVisRange = "{4423, 1337}";
691  
-			sepNavWindowFrame = "{{15, 33}, {772, 837}}";
  1130
+			sepNavIntBoundsRect = "{{0, 0}, {795, 3341}}";
  1131
+			sepNavSelRange = "{5407, 0}";
  1132
+			sepNavVisRange = "{5181, 573}";
  1133
+			sepNavWindowFrame = "{{650, 41}, {772, 837}}";
692 1134
 		};
693 1135
 	};
694 1136
 	03E2CCC90E2729800077196A /* PackardBugs.plist */ = {
@@ -698,17 +1140,17 @@
698 1140
 	};