Permalink
Browse files

Coloring and distribution view

  • Loading branch information...
1 parent 3c45fc7 commit d6691829a86ffd533d93daae3f2f854271cca769 @qwzybug committed Oct 22, 2009
View
7 plugins/Packard Bugs/BugNeighborhoodView.h
@@ -4,14 +4,17 @@
*/
#import <Cocoa/Cocoa.h>
-#import "BugsController.h"
+
+#import "BugsColoringWindowController.h"
@interface BugNeighborhoodView : NSControl {
int neighborhoodCode;
NSRect rects[5];
- IBOutlet id controller;
+ IBOutlet BugsColoringWindowController *controller;
bool enabled;
}
+
@property(assign, readwrite) bool enabled;
@property(assign, readwrite) int neighborhoodCode;
+
@end
View
3 plugins/Packard Bugs/BugNeighborhoodView.m
@@ -63,8 +63,7 @@ - (void)mouseDown:(NSEvent *)theEvent {
}
[self setNeedsDisplay:YES];
-// ((BugsController *)controller).observedGene = neighborhoodCode;
-// [controller redrawDisplay];
+ [controller setGene:neighborhoodCode];
}
//- (id)initWithCoder:(NSCoder *)decoder;
View
6 plugins/Packard Bugs/BugsColoringWindowController.h
@@ -17,10 +17,14 @@
IBOutlet GeneDistributionView *distributionView;
IBOutlet BugNeighborhoodView *neighborhoodView;
+
+ NSDate *lastDistributionDisplay;
}
@property (nonatomic, retain) BugsController *controller;
+@property (nonatomic, retain) NSDate *lastDistributionDisplay;
-- (IBAction)setGene:(id)sender;
+- (void)setGene:(int)newGene;
+- (void)updateDistributionView;
@end
View
39 plugins/Packard Bugs/BugsColoringWindowController.m
@@ -15,13 +15,44 @@
@implementation BugsColoringWindowController
@synthesize controller;
+@synthesize lastDistributionDisplay;
-- (IBAction)setGene:(id)sender;
+- (void)dealloc;
{
- NSLog(@"Coloring by %d", neighborhoodView.neighborhoodCode);
- ((BugsController *)controller).observedGene = neighborhoodView.neighborhoodCode;
- [controller redrawDisplay];
+ [lastDistributionDisplay release], lastDistributionDisplay = nil;
+ [controller release], controller = nil;
+
+ [super dealloc];
+}
+
+- (void)setGene:(int)newGene;
+{
+ controller.observedGene = newGene;
+ distributionView.gene = newGene;
+ [self updateDistributionView];
+}
+
+- (void)awakeFromNib;
+{
+ self.lastDistributionDisplay = [NSDate date];
+ [controller.world addObserver:self forKeyPath:@"ticks" options:NSKeyValueObservingOptionNew context:nil];
+}
+
+- (void)updateDistributionView;
+{
+ distributionView.bugs = controller.world.bugs;
[distributionView setNeedsDisplay:YES];
+ self.lastDistributionDisplay = [NSDate date];
+}
+
+- (void)observeValueForKeyPath:(NSString *)keyPath
+ ofObject:(id)object
+ change:(NSDictionary *)change
+ context:(void *)context
+{
+ if ([keyPath isEqual:@"ticks"] && [[NSDate date] timeIntervalSinceDate:self.lastDistributionDisplay] > 0.5) {
+ [self updateDistributionView];
+ }
}
@end
View
49 plugins/Packard Bugs/BugsColoringWindowController.xib
@@ -12,7 +12,7 @@
</object>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
- <integer value="29"/>
+ <integer value="36"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -87,7 +87,6 @@
<int key="NSvFlags">268</int>
<string key="NSFrame">{{7, 8}, {97, 17}}</string>
<reference key="NSSuperview" ref="581891850"/>
- <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="967921939">
<int key="NSCellFlags">67239488</int>
@@ -124,15 +123,13 @@
<int key="NSvFlags">268</int>
<string key="NSFrame">{{109, 0}, {32, 32}}</string>
<reference key="NSSuperview" ref="581891850"/>
- <reference key="NSWindow"/>
<string key="NSClassName">BugNeighborhoodView</string>
</object>
<object class="NSTextField" id="460915021">
<reference key="NSNextResponder" ref="581891850"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{149, 8}, {35, 15}}</string>
<reference key="NSSuperview" ref="581891850"/>
- <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="103122001">
<int key="NSCellFlags">71433792</int>
@@ -153,12 +150,10 @@
</object>
<string key="NSFrameSize">{188, 32}</string>
<reference key="NSSuperview" ref="272764698"/>
- <reference key="NSWindow"/>
</object>
</object>
<string key="NSFrame">{{0, 14}, {188, 32}}</string>
<reference key="NSSuperview"/>
- <reference key="NSWindow"/>
<string key="NSOffsets">{0, 0}</string>
<object class="NSTextFieldCell" key="NSTitleCell">
<int key="NSCellFlags">67239424</int>
@@ -298,12 +293,36 @@
<int key="connectionID">43</int>
</object>
<object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">setGene:</string>
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">controller</string>
+ <reference key="source" ref="511287409"/>
+ <reference key="destination" ref="1001"/>
+ </object>
+ <int key="connectionID">45</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">distributionView</string>
<reference key="source" ref="1001"/>
- <reference key="destination" ref="511287409"/>
+ <reference key="destination" ref="395324607"/>
+ </object>
+ <int key="connectionID">46</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBBindingConnection" key="connection">
+ <string key="label">value: controller.observedGene</string>
+ <reference key="source" ref="460915021"/>
+ <reference key="destination" ref="1001"/>
+ <object class="NSNibBindingConnector" key="connector">
+ <reference key="NSSource" ref="460915021"/>
+ <reference key="NSDestination" ref="1001"/>
+ <string key="NSLabel">value: controller.observedGene</string>
+ <string key="NSBinding">value</string>
+ <string key="NSKeyPath">controller.observedGene</string>
+ <int key="NSNibBindingConnectorVersion">2</int>
+ </object>
</object>
- <int key="connectionID">44</int>
+ <int key="connectionID">48</int>
</object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
@@ -464,7 +483,7 @@
<string>{{586, 488}, {310, 310}}</string>
<real value="0.0"/>
<string>{{220, 200}, {310, 310}}</string>
- <string>{{433, 798}, {616, 0}}</string>
+ <string>{{433, 629}, {616, 169}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>{{67, 510}, {616, 0}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
@@ -495,7 +514,7 @@
</object>
</object>
<nil key="sourceID"/>
- <int key="maxID">44</int>
+ <int key="maxID">48</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
@@ -505,7 +524,7 @@
<string key="superclassName">NSControl</string>
<object class="NSMutableDictionary" key="outlets">
<string key="NS.key.0">controller</string>
- <string key="NS.object.0">id</string>
+ <string key="NS.object.0">BugsColoringWindowController</string>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
@@ -515,10 +534,6 @@
<object class="IBPartialClassDescription">
<string key="className">BugsColoringWindowController</string>
<string key="superclassName">NSWindowController</string>
- <object class="NSMutableDictionary" key="actions">
- <string key="NS.key.0">setGene:</string>
- <string key="NS.object.0">id</string>
- </object>
<object class="NSMutableDictionary" key="outlets">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
View
9 plugins/Packard Bugs/BugsController.m
@@ -72,6 +72,7 @@ - (void)dealloc;
{
[world release];
[statistics release];
+ [view release];
[super dealloc];
}
@@ -109,12 +110,20 @@ - (id)statisticsCollector;
return statistics;
}
+- (void)setObservedGene:(int)newObservedGene;
+{
+ observedGene = newObservedGene;
+ self.view.colorGene = observedGene;
+ [self.view setNeedsDisplay:YES];
+}
+
#pragma mark -
- (void)showColorWindow;
{
if (!coloringWindowController) {
coloringWindowController = [[BugsColoringWindowController alloc] initWithWindowNibName:@"BugsColoringWindowController"];
+ coloringWindowController.controller = self;
}
[coloringWindowController.window makeKeyAndOrderFront:self];
}
View
5 plugins/Packard Bugs/GeneDistributionView.h
@@ -19,8 +19,13 @@
int gene;
bool needsRedisplay;
int geneCounts[31][31];
+
+ NSSet *bugs;
}
- (void)timerTick:(NSTimer *)theTimer;
+@property (nonatomic, retain) NSSet *bugs;
+@property (nonatomic, assign) int gene;
+
@end
View
75 plugins/Packard Bugs/GeneDistributionView.m
@@ -8,9 +8,13 @@
#import "GeneDistributionView.h"
+#import "Bug.h"
@implementation GeneDistributionView
+@synthesize bugs;
+@synthesize gene;
+
- (id)initWithFrame:(NSRect)frame;
{
if (!(self = [super initWithFrame:frame]))
@@ -33,61 +37,32 @@ - (void)timerTick:(NSTimer *)theTimer;
}
}
-//- (void)awakeFromNib;
-//{
-// [controller addObserver:self
-// forKeyPath:@"world.ticks"
-// options:NSKeyValueObservingOptionNew
-// context:NULL];
-//
-//// [controller addObserver:self
-//// forKeyPath:@"observedGene"
-//// options:NSKeyValueObservingOptionNew
-//// context:NULL];
-//}
-
-- (void)observeValueForKeyPath:(NSString *)keyPath
- ofObject:(id)object
- change:(NSDictionary *)change
- context:(void *)context
-{
-// if ([keyPath isEqual:@"observedGene"]) {
-// [[change objectForKey:NSKeyValueChangeNewKey] getValue:&gene];
-// [self setNeedsDisplay:YES];
-// } else {
- needsRedisplay = true;
-// }
-}
-
- (void)drawRect:(NSRect)rect;
{
-// int i, j;
-// float rectWidth = [self frame].size.width / 31.0;
-// float rectHeight = [self frame].size.height / 31.0;
-// Bug *bug;
-// BugMovement movement;
-// for (NSMutableArray *row in controller.world.grid) {
-// for (Cell *cell in row) {
-// if (bug = cell.bug) {
-// movement = [bug getMovementForGene:gene];
-// geneCounts[movement.x + 15][movement.y + 15] += 1;
-// }
-// }
-// }
+ int i, j;
+ float rectWidth = [self frame].size.width / 31.0;
+ float rectHeight = [self frame].size.height / 31.0;
+
+ for (Bug *bug in self.bugs) {
+ BugMovement movement = [bug getMovementForGene:gene];
+ geneCounts[movement.x + 15][movement.y + 15] += 1;
+ }
+
// draw gene count distribution
int rectCount = 0;
-// int population = controller.world.population;
+ int population = [self.bugs count];
+ NSLog(@"%d bugs", population);
NSRect geneRects[120];
-// for (i = 0; i < 31; i++) {
-// for (j = 0; j < 31; j++) {
-// if (geneCounts[i][j] > 0) {
-// float rectSize = log2(geneCounts[i][j] * 120.0 / population + 1) + 1;
-// geneRects[rectCount] = NSMakeRect(rectWidth * i - (rectSize - rectWidth)/2, rectHeight * j - (rectSize - rectWidth)/2, rectSize, rectSize);
-// rectCount++;
-// }
-// geneCounts[i][j] = 0; // reset count to 0 for next count
-// }
-// }
+ for (i = 0; i < 31; i++) {
+ for (j = 0; j < 31; j++) {
+ if (geneCounts[i][j] > 0) {
+ float rectSize = log2(geneCounts[i][j] * 120.0 / population + 1) + 1;
+ geneRects[rectCount] = NSMakeRect(rectWidth * i - (rectSize - rectWidth)/2, rectHeight * j - (rectSize - rectWidth)/2, rectSize, rectSize);
+ rectCount++;
+ }
+ geneCounts[i][j] = 0; // reset count to 0 for next count
+ }
+ }
[[NSColor colorWithDeviceWhite:0.0 alpha:0.5] set];
NSRectFillList(geneRects, rectCount);
needsRedisplay = false;
View
611 plugins/Packard Bugs/Packard Bugs Plugin.xcodeproj/d.pbxuser
@@ -70,24 +70,6 @@
vrLen = 1251;
vrLoc = 859;
};
- 035AF13A1090223B00725226 /* World.m:74 */ = {
- isa = PBXFileBreakpoint;
- actions = (
- );
- breakpointStyle = 0;
- continueAfterActions = 0;
- countType = 0;
- delayBeforeContinue = 0;
- fileReference = 03E2CCC30E2729460077196A /* World.m */;
- functionName = "-setFoodImage:";
- hitCount = 1;
- ignoreCount = 0;
- lineNumber = 74;
- location = "Packard Bugs Plugin";
- modificationTime = 277883002.854411;
- originalNumberOfMultipleMatches = 1;
- state = 1;
- };
035AF1461090225400725226 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 03E2CCC30E2729460077196A /* World.m */;
@@ -189,6 +171,466 @@
vrLen = 1345;
vrLoc = 725;
};
+ 035AF3091090480700725226 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 0381D66E1086827D00072A80 /* BugsColoringWindowController.m */;
+ name = "BugsColoringWindowController.m: 21";
+ rLen = 0;
+ rLoc = 596;
+ rType = 0;
+ vrLen = 633;
+ vrLoc = 0;
+ };
+ 035AF30A1090480700725226 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 0381D6601086814600072A80 /* BugNeighborhoodView.h */;
+ name = "BugNeighborhoodView.h: 1";
+ rLen = 0;
+ rLoc = 0;
+ rType = 0;
+ vrLen = 364;
+ vrLoc = 0;
+ };
+ 035AF30B1090480700725226 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 0381D6611086814600072A80 /* BugNeighborhoodView.m */;
+ name = "BugNeighborhoodView.m: 40";
+ rLen = 0;
+ rLoc = 1141;
+ rType = 0;
+ vrLen = 844;
+ vrLoc = 1088;
+ };
+ 035AF30C1090480700725226 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 0381D6611086814600072A80 /* BugNeighborhoodView.m */;
+ name = "BugNeighborhoodView.m: 40";
+ rLen = 0;
+ rLoc = 1141;
+ rType = 0;
+ vrLen = 845;
+ vrLoc = 1087;
+ };
+ 035AF317109048AE00725226 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 0381D6601086814600072A80 /* BugNeighborhoodView.h */;
+ name = "BugNeighborhoodView.h: 13";
+ rLen = 0;
+ rLoc = 278;
+ rType = 0;
+ vrLen = 408;
+ vrLoc = 0;
+ };
+ 035AF318109048AE00725226 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 0381D6611086814600072A80 /* BugNeighborhoodView.m */;
+ name = "BugNeighborhoodView.m: 66";
+ rLen = 0;
+ rLoc = 1679;
+ rType = 0;
+ vrLen = 787;
+ vrLoc = 1087;
+ };
+ 035AF319109048AE00725226 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 0381D66D1086827D00072A80 /* BugsColoringWindowController.h */;
+ name = "BugsColoringWindowController.h: 24";
+ rLen = 30;
+ rLoc = 631;
+ rType = 0;
+ vrLen = 568;
+ vrLoc = 0;
+ };
+ 035AF31A109048AE00725226 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 0381D66E1086827D00072A80 /* BugsColoringWindowController.m */;
+ name = "BugsColoringWindowController.m: 21";
+ rLen = 0;
+ rLoc = 630;
+ rType = 0;
+ vrLen = 543;
+ vrLoc = 0;
+ };
+ 035AF32E109049E700725226 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 03E2CCC20E2729460077196A /* World.h */;
+ name = "World.h: 45";
+ rLen = 0;
+ rLoc = 848;
+ rType = 0;
+ vrLen = 1090;
+ vrLoc = 177;
+ };
+ 035AF32F109049E700725226 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 03E2CCB80E2729340077196A /* WorldView.h */;
+ name = "WorldView.h: 21";
+ rLen = 0;
+ rLoc = 360;
+ rType = 0;
+ vrLen = 367;
+ vrLoc = 0;
+ };
+ 035AF330109049E700725226 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 03E2CCB90E2729340077196A /* WorldView.m */;
+ name = "WorldView.m: 18";
+ rLen = 0;
+ rLoc = 284;
+ rType = 0;
+ vrLen = 649;
+ vrLoc = 0;
+ };
+ 035AF331109049E700725226 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 03E2CD740E272F910077196A /* BugsController.h */;
+ name = "BugsController.h: 21";
+ rLen = 0;
+ rLoc = 448;
+ rType = 0;
+ vrLen = 760;
+ vrLoc = 0;
+ };
+ 035AF332109049E700725226 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 03E2CD750E272F910077196A /* BugsController.m */;
+ name = "BugsController.m: 87";
+ rLen = 0;
+ rLoc = 2152;
+ rType = 0;
+ vrLen = 615;
+ vrLoc = 1926;
+ };
+ 035AF333109049E700725226 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 0381D66E1086827D00072A80 /* BugsColoringWindowController.m */;
+ name = "BugsColoringWindowController.m: 21";
+ rLen = 0;
+ rLoc = 630;
+ rType = 0;
+ vrLen = 543;
+ vrLoc = 0;
+ };
+ 035AF334109049E700725226 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 0381D66E1086827D00072A80 /* BugsColoringWindowController.m */;
+ name = "BugsColoringWindowController.m: 21";
+ rLen = 0;
+ rLoc = 630;
+ rType = 0;
+ vrLen = 543;
+ vrLoc = 0;
+ };
+ 035AF34010904AA300725226 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 03E2CD750E272F910077196A /* BugsController.m */;
+ name = "BugsController.m: 117";
+ rLen = 0;
+ rLoc = 2592;
+ rType = 0;
+ vrLen = 651;
+ vrLoc = 2024;
+ };
+ 035AF34110904AA300725226 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 0381D66E1086827D00072A80 /* BugsColoringWindowController.m */;
+ name = "BugsColoringWindowController.m: 21";
+ rLen = 0;
+ rLoc = 630;
+ rType = 0;
+ vrLen = 543;
+ vrLoc = 0;
+ };
+ 035AF34210904AA300725226 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 0381D66E1086827D00072A80 /* BugsColoringWindowController.m */;
+ name = "BugsColoringWindowController.m: 22";
+ rLen = 0;
+ rLoc = 666;
+ rType = 0;
+ vrLen = 514;
+ vrLoc = 0;
+ };
+ 035AF34710904AC200725226 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 0381D66E1086827D00072A80 /* BugsColoringWindowController.m */;
+ name = "BugsColoringWindowController.m: 21";
+ rLen = 0;
+ rLoc = 596;
+ rType = 0;
+ vrLen = 547;
+ vrLoc = 0;
+ };
+ 035AF34F10904B0000725226 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 03E2CCB90E2729340077196A /* WorldView.m */;
+ name = "WorldView.m: 76";
+ rLen = 0;
+ rLoc = 1267;
+ rType = 0;
+ vrLen = 649;
+ vrLoc = 0;
+ };
+ 035AF35010904B0000725226 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 03E2CCB80E2729340077196A /* WorldView.h */;
+ name = "WorldView.h: 21";
+ rLen = 0;
+ rLoc = 360;
+ rType = 0;
+ vrLen = 367;
+ vrLoc = 0;
+ };
+ 035AF35110904B0000725226 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 0381D66D1086827D00072A80 /* BugsColoringWindowController.h */;
+ name = "BugsColoringWindowController.h: 24";
+ rLen = 30;
+ rLoc = 631;
+ rType = 0;
+ vrLen = 568;
+ vrLoc = 0;
+ };
+ 035AF35210904B0000725226 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 0381D66E1086827D00072A80 /* BugsColoringWindowController.m */;
+ name = "BugsColoringWindowController.m: 21";
+ rLen = 0;
+ rLoc = 596;
+ rType = 0;
+ vrLen = 547;
+ vrLoc = 0;
+ };
+ 035AF35310904B0000725226 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 03E2CD750E272F910077196A /* BugsController.m */;
+ name = "BugsController.m: 117";
+ rLen = 0;
+ rLoc = 2592;
+ rType = 0;
+ vrLen = 651;
+ vrLoc = 2024;
+ };
+ 035AF35410904B0000725226 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 03E2CD750E272F910077196A /* BugsController.m */;
+ name = "BugsController.m: 126";
+ rLen = 0;
+ rLoc = 2843;
+ rType = 0;
+ vrLen = 762;
+ vrLoc = 2155;
+ };
+ 035AF35610904B2800725226 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 03E2CD750E272F910077196A /* BugsController.m */;
+ name = "BugsController.m: 126";
+ rLen = 0;
+ rLoc = 2843;
+ rType = 0;
+ vrLen = 762;
+ vrLoc = 2155;
+ };
+ 035AF35710904B2800725226 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 03E2CCB90E2729340077196A /* WorldView.m */;
+ name = "WorldView.m: 75";
+ rLen = 0;
+ rLoc = 1267;
+ rType = 0;
+ vrLen = 1459;
+ vrLoc = 819;
+ };
+ 035AF36810904DFE00725226 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 03E2CCB90E2729340077196A /* WorldView.m */;
+ name = "WorldView.m: 93";
+ rLen = 0;
+ rLoc = 1764;
+ rType = 0;
+ vrLen = 1478;
+ vrLoc = 1059;
+ };
+ 035AF36910904DFE00725226 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 03E2CCC20E2729460077196A /* World.h */;
+ name = "World.h: 45";
+ rLen = 0;
+ rLoc = 848;
+ rType = 0;
+ vrLen = 1094;
+ vrLoc = 137;
+ };
+ 035AF36A10904DFE00725226 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 0381D6631086816700072A80 /* GeneDistributionView.h */;
+ name = "GeneDistributionView.h: 28";
+ rLen = 0;
+ rLoc = 554;
+ rType = 0;
+ vrLen = 521;
+ vrLoc = 0;
+ };
+ 035AF36B10904DFE00725226 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 0381D6641086816700072A80 /* GeneDistributionView.m */;
+ name = "GeneDistributionView.m: 52";
+ rLen = 1;
+ rLoc = 832;
+ rType = 0;
+ vrLen = 1156;
+ vrLoc = 688;
+ };
+ 035AF36C10904DFE00725226 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 0381D66D1086827D00072A80 /* BugsColoringWindowController.h */;
+ name = "BugsColoringWindowController.h: 25";
+ rLen = 0;
+ rLoc = 629;
+ rType = 0;
+ vrLen = 667;
+ vrLoc = 0;
+ };
+ 035AF36D10904DFE00725226 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 0381D66E1086827D00072A80 /* BugsColoringWindowController.m */;
+ name = "BugsColoringWindowController.m: 22";
+ rLen = 0;
+ rLoc = 560;
+ rType = 0;
+ vrLen = 1196;
+ vrLoc = 0;
+ };
+ 035AF36E10904DFE00725226 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 0381D66E1086827D00072A80 /* BugsColoringWindowController.m */;
+ name = "BugsColoringWindowController.m: 18";
+ rLen = 0;
+ rLoc = 412;
+ rType = 0;
+ vrLen = 1133;
+ vrLoc = 170;
+ };
+ 035AF37310904E5C00725226 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 0381D66D1086827D00072A80 /* BugsColoringWindowController.h */;
+ name = "BugsColoringWindowController.h: 29";
+ rLen = 0;
+ rLoc = 693;
+ rType = 0;
+ vrLen = 699;
+ vrLoc = 0;
+ };
+ 035AF37410904E5C00725226 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 0381D66E1086827D00072A80 /* BugsColoringWindowController.m */;
+ name = "BugsColoringWindowController.m: 41";
+ rLen = 32;
+ rLoc = 882;
+ rType = 0;
+ vrLen = 1173;
+ vrLoc = 240;
+ };
+ 035AF37510904E5C00725226 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 0381D66E1086827D00072A80 /* BugsColoringWindowController.m */;
+ name = "BugsColoringWindowController.m: 32";
+ rLen = 0;
+ rLoc = 697;
+ rType = 0;
+ vrLen = 1190;
+ vrLoc = 212;
+ };
+ 035AF37A10904E8600725226 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 0381D66E1086827D00072A80 /* BugsColoringWindowController.m */;
+ name = "BugsColoringWindowController.m: 32";
+ rLen = 0;
+ rLoc = 697;
+ rType = 0;
+ vrLen = 1104;
+ vrLoc = 306;
+ };
+ 035AF37B10904E8600725226 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 0381D6641086816700072A80 /* GeneDistributionView.m */;
+ name = "GeneDistributionView.m: 79";
+ rLen = 0;
+ rLoc = 1250;
+ rType = 0;
+ vrLen = 1321;
+ vrLoc = 1124;
+ };
+ 035AF38110904ED000725226 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 0381D6641086816700072A80 /* GeneDistributionView.m */;
+ name = "GeneDistributionView.m: 79";
+ rLen = 0;
+ rLoc = 1248;
+ rType = 0;
+ vrLen = 1333;
+ vrLoc = 1124;
+ };
+ 035AF38710904F4A00725226 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 0381D6631086816700072A80 /* GeneDistributionView.h */;
+ name = "GeneDistributionView.h: 29";
+ rLen = 0;
+ rLoc = 554;
+ rType = 0;
+ vrLen = 561;
+ vrLoc = 0;
+ };
+ 035AF38810904F4A00725226 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 0381D6641086816700072A80 /* GeneDistributionView.m */;
+ name = "GeneDistributionView.m: 38";
+ rLen = 0;
+ rLoc = 832;
+ rType = 0;
+ vrLen = 1223;
+ vrLoc = 572;
+ };
+ 035AF38910904F4A00725226 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 0381D66E1086827D00072A80 /* BugsColoringWindowController.m */;
+ name = "BugsColoringWindowController.m: 31";
+ rLen = 0;
+ rLoc = 665;
+ rType = 0;
+ vrLen = 1106;
+ vrLoc = 305;
+ };
+ 035AF38A10904FA600725226 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 0381D66D1086827D00072A80 /* BugsColoringWindowController.h */;
+ name = "BugsColoringWindowController.h: 29";
+ rLen = 0;
+ rLoc = 693;
+ rType = 0;
+ vrLen = 699;
+ vrLoc = 0;
+ };
+ 035AF38B10904FA600725226 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 0381D66E1086827D00072A80 /* BugsColoringWindowController.m */;
+ name = "BugsColoringWindowController.m: 31";
+ rLen = 0;
+ rLoc = 665;
+ rType = 0;
+ vrLen = 1106;
+ vrLoc = 305;
+ };
+ 035AF38C10904FA600725226 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 0381D66E1086827D00072A80 /* BugsColoringWindowController.m */;
+ name = "BugsColoringWindowController.m: 30";
+ rLen = 0;
+ rLoc = 607;
+ rType = 0;
+ vrLen = 1086;
+ vrLoc = 305;
+ };
0381D4BB10865AF900072A80 /* PBXBookmark */ = {
isa = PBXBookmark;
fRef = 03E2CCC30E2729460077196A /* World.m */;
@@ -315,48 +757,48 @@
};
0381D6601086814600072A80 /* BugNeighborhoodView.h */ = {
uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1059, 786}}";
- sepNavSelRange = "{352, 16}";
- sepNavVisRange = "{0, 375}";
+ sepNavIntBoundsRect = "{{0, 0}, {703, 569}}";
+ sepNavSelRange = "{278, 0}";
+ sepNavVisRange = "{0, 408}";
sepNavWindowFrame = "{{37, 300}, {1118, 878}}";
};
};
0381D6611086814600072A80 /* BugNeighborhoodView.m */ = {
uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {929, 1001}}";
- sepNavSelRange = "{1141, 0}";
- sepNavVisRange = "{205, 1622}";
+ sepNavIntBoundsRect = "{{0, 0}, {901, 1040}}";
+ sepNavSelRange = "{1679, 0}";
+ sepNavVisRange = "{1087, 787}";
sepNavWindowFrame = "{{14, 300}, {988, 878}}";
};
};
0381D6631086816700072A80 /* GeneDistributionView.h */ = {
uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {872, 786}}";
- sepNavSelRange = "{303, 0}";
- sepNavVisRange = "{0, 461}";
+ sepNavIntBoundsRect = "{{0, 0}, {654, 580}}";
+ sepNavSelRange = "{554, 0}";
+ sepNavVisRange = "{0, 561}";
sepNavWindowFrame = "{{876, 300}, {931, 878}}";
};
};
0381D6641086816700072A80 /* GeneDistributionView.m */ = {
uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1097, 1183}}";
- sepNavSelRange = "{1981, 24}";
- sepNavVisRange = "{1461, 886}";
+ sepNavIntBoundsRect = "{{0, 0}, {1097, 936}}";
+ sepNavSelRange = "{832, 0}";
+ sepNavVisRange = "{572, 1223}";
sepNavWindowFrame = "{{222, 84}, {931, 900}}";
};
};
0381D66D1086827D00072A80 /* BugsColoringWindowController.h */ = {
uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {872, 808}}";
- sepNavSelRange = "{275, 0}";
- sepNavVisRange = "{0, 570}";
+ sepNavIntBoundsRect = "{{0, 0}, {654, 580}}";
+ sepNavSelRange = "{693, 0}";
+ sepNavVisRange = "{0, 699}";
};
};
0381D66E1086827D00072A80 /* BugsColoringWindowController.m */ = {
uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1059, 786}}";
- sepNavSelRange = "{472, 0}";
- sepNavVisRange = "{0, 633}";
+ sepNavIntBoundsRect = "{{0, 0}, {803, 767}}";
+ sepNavSelRange = "{607, 0}";
+ sepNavVisRange = "{305, 1086}";
sepNavWindowFrame = "{{244, 300}, {1118, 878}}";
};
};
@@ -383,7 +825,7 @@
fRef = 0381D66E1086827D00072A80 /* BugsColoringWindowController.m */;
name = "BugsColoringWindowController.m: 21";
rLen = 0;
- rLoc = 553;
+ rLoc = 630;
rType = 0;
vrLen = 571;
vrLoc = 0;
@@ -393,7 +835,7 @@
fRef = 03E2CD750E272F910077196A /* BugsController.m */;
name = "BugsController.m: 95";
rLen = 23;
- rLoc = 2317;
+ rLoc = 2334;
rType = 0;
vrLen = 1800;
vrLoc = 410;
@@ -422,15 +864,15 @@
isa = PBXTextBookmark;
fRef = 03E2CD750E272F910077196A /* BugsController.m */;
rLen = 0;
- rLoc = 2699;
+ rLoc = 2917;
rType = 0;
};
0381D6DA108688A400072A80 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 0381D6641086816700072A80 /* GeneDistributionView.m */;
name = "GeneDistributionView.m: 43";
rLen = 0;
- rLoc = 781;
+ rLoc = 832;
rType = 0;
vrLen = 1705;
vrLoc = 636;
@@ -474,7 +916,7 @@
fRef = 0381D66E1086827D00072A80 /* BugsColoringWindowController.m */;
name = "BugsColoringWindowController.m: 21";
rLen = 0;
- rLoc = 472;
+ rLoc = 596;
rType = 0;
vrLen = 633;
vrLoc = 0;
@@ -484,7 +926,7 @@
fRef = 0381D6611086814600072A80 /* BugNeighborhoodView.m */;
name = "BugNeighborhoodView.m: 38";
rLen = 0;
- rLoc = 1141;
+ rLoc = 1143;
rType = 0;
vrLen = 1626;
vrLoc = 205;
@@ -504,9 +946,9 @@
fRef = 0381D6601086814600072A80 /* BugNeighborhoodView.h */;
name = "BugNeighborhoodView.h: 16";
rLen = 16;
- rLoc = 352;
+ rLoc = 384;
rType = 0;
- vrLen = 375;
+ vrLen = 364;
vrLoc = 0;
};
0381D7391086C07F00072A80 /* PBXTextBookmark */ = {
@@ -625,16 +1067,16 @@
};
03E2CCB80E2729340077196A /* WorldView.h */ = {
uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {519, 426}}";
- sepNavSelRange = "{238, 0}";
- sepNavVisRange = "{0, 305}";
+ sepNavIntBoundsRect = "{{0, 0}, {703, 569}}";
+ sepNavSelRange = "{360, 0}";
+ sepNavVisRange = "{0, 367}";
};
};
03E2CCB90E2729340077196A /* WorldView.m */ = {
uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {756, 1722}}";
- sepNavSelRange = "{801, 0}";
- sepNavVisRange = "{474, 787}";
+ sepNavIntBoundsRect = "{{0, 0}, {880, 1547}}";
+ sepNavSelRange = "{1764, 0}";
+ sepNavVisRange = "{1059, 1478}";
};
};
03E2CCBC0E2729460077196A /* BugsStatistics.h */ = {
@@ -677,18 +1119,18 @@
};
03E2CCC20E2729460077196A /* World.h */ = {
uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {713, 1014}}";
+ sepNavIntBoundsRect = "{{0, 0}, {654, 1014}}";
sepNavSelRange = "{848, 0}";
- sepNavVisRange = "{74, 1526}";
+ sepNavVisRange = "{137, 1094}";
sepNavWindowFrame = "{{725, 333}, {772, 837}}";
};
};
03E2CCC30E2729460077196A /* World.m */ = {
uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {713, 3406}}";
- sepNavSelRange = "{5408, 42}";
- sepNavVisRange = "{4423, 1337}";
- sepNavWindowFrame = "{{15, 33}, {772, 837}}";
+ sepNavIntBoundsRect = "{{0, 0}, {795, 3341}}";
+ sepNavSelRange = "{5407, 0}";
+ sepNavVisRange = "{5181, 573}";
+ sepNavWindowFrame = "{{650, 41}, {772, 837}}";
};
};
03E2CCC90E2729800077196A /* PackardBugs.plist */ = {
@@ -698,17 +1140,17 @@
};
03E2CD740E272F910077196A /* BugsController.h */ = {
uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {773, 780}}";
+ sepNavIntBoundsRect = "{{0, 0}, {703, 569}}";
sepNavSelRange = "{448, 0}";
- sepNavVisRange = "{0, 677}";
+ sepNavVisRange = "{0, 760}";
sepNavWindowFrame = "{{68, 70}, {832, 872}}";
};
};
03E2CD750E272F910077196A /* BugsController.m */ = {
uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {796, 1482}}";
- sepNavSelRange = "{1195, 17}";
- sepNavVisRange = "{318, 1657}";
+ sepNavIntBoundsRect = "{{0, 0}, {908, 1690}}";
+ sepNavSelRange = "{2843, 0}";
+ sepNavVisRange = "{2155, 762}";
sepNavWindowFrame = "{{65, 125}, {772, 837}}";
};
};
@@ -719,7 +1161,6 @@
8D5B49AC048680CD000E48DA /* Packard Bugs Plugin */,
);
breakpoints = (
- 035AF13A1090223B00725226 /* World.m:74 */,
);
codeSenseManager = 03E2CCB70E2729140077196A /* Code sense */;
perUserDictionary = {
@@ -800,6 +1241,52 @@
035AF1741090249D00725226 /* PBXTextBookmark */ = 035AF1741090249D00725226 /* PBXTextBookmark */;
035AF1B61090286F00725226 /* PBXTextBookmark */ = 035AF1B61090286F00725226 /* PBXTextBookmark */;
035AF1B71090286F00725226 /* PBXTextBookmark */ = 035AF1B71090286F00725226 /* PBXTextBookmark */;
+ 035AF3091090480700725226 /* PBXTextBookmark */ = 035AF3091090480700725226 /* PBXTextBookmark */;
+ 035AF30A1090480700725226 /* PBXTextBookmark */ = 035AF30A1090480700725226 /* PBXTextBookmark */;
+ 035AF30B1090480700725226 /* PBXTextBookmark */ = 035AF30B1090480700725226 /* PBXTextBookmark */;
+ 035AF30C1090480700725226 /* PBXTextBookmark */ = 035AF30C1090480700725226 /* PBXTextBookmark */;
+ 035AF317109048AE00725226 /* PBXTextBookmark */ = 035AF317109048AE00725226 /* PBXTextBookmark */;
+ 035AF318109048AE00725226 /* PBXTextBookmark */ = 035AF318109048AE00725226 /* PBXTextBookmark */;
+ 035AF319109048AE00725226 /* PBXTextBookmark */ = 035AF319109048AE00725226 /* PBXTextBookmark */;
+ 035AF31A109048AE00725226 /* PBXTextBookmark */ = 035AF31A109048AE00725226 /* PBXTextBookmark */;
+ 035AF32E109049E700725226 /* PBXTextBookmark */ = 035AF32E109049E700725226 /* PBXTextBookmark */;
+ 035AF32F109049E700725226 /* PBXTextBookmark */ = 035AF32F109049E700725226 /* PBXTextBookmark */;
+ 035AF330109049E700725226 /* PBXTextBookmark */ = 035AF330109049E700725226 /* PBXTextBookmark */;
+ 035AF331109049E700725226 /* PBXTextBookmark */ = 035AF331109049E700725226 /* PBXTextBookmark */;
+ 035AF332109049E700725226 /* PBXTextBookmark */ = 035AF332109049E700725226 /* PBXTextBookmark */;
+ 035AF333109049E700725226 /* PBXTextBookmark */ = 035AF333109049E700725226 /* PBXTextBookmark */;
+ 035AF334109049E700725226 /* PBXTextBookmark */ = 035AF334109049E700725226 /* PBXTextBookmark */;
+ 035AF34010904AA300725226 /* PBXTextBookmark */ = 035AF34010904AA300725226 /* PBXTextBookmark */;
+ 035AF34110904AA300725226 /* PBXTextBookmark */ = 035AF34110904AA300725226 /* PBXTextBookmark */;
+ 035AF34210904AA300725226 /* PBXTextBookmark */ = 035AF34210904AA300725226 /* PBXTextBookmark */;
+ 035AF34710904AC200725226 /* PBXTextBookmark */ = 035AF34710904AC200725226 /* PBXTextBookmark */;
+ 035AF34F10904B0000725226 /* PBXTextBookmark */ = 035AF34F10904B0000725226 /* PBXTextBookmark */;
+ 035AF35010904B0000725226 /* PBXTextBookmark */ = 035AF35010904B0000725226 /* PBXTextBookmark */;
+ 035AF35110904B0000725226 /* PBXTextBookmark */ = 035AF35110904B0000725226 /* PBXTextBookmark */;
+ 035AF35210904B0000725226 /* PBXTextBookmark */ = 035AF35210904B0000725226 /* PBXTextBookmark */;
+ 035AF35310904B0000725226 /* PBXTextBookmark */ = 035AF35310904B0000725226 /* PBXTextBookmark */;
+ 035AF35410904B0000725226 /* PBXTextBookmark */ = 035AF35410904B0000725226 /* PBXTextBookmark */;
+ 035AF35610904B2800725226 /* PBXTextBookmark */ = 035AF35610904B2800725226 /* PBXTextBookmark */;
+ 035AF35710904B2800725226 /* PBXTextBookmark */ = 035AF35710904B2800725226 /* PBXTextBookmark */;
+ 035AF36810904DFE00725226 /* PBXTextBookmark */ = 035AF36810904DFE00725226 /* PBXTextBookmark */;
+ 035AF36910904DFE00725226 /* PBXTextBookmark */ = 035AF36910904DFE00725226 /* PBXTextBookmark */;
+ 035AF36A10904DFE00725226 /* PBXTextBookmark */ = 035AF36A10904DFE00725226 /* PBXTextBookmark */;
+ 035AF36B10904DFE00725226 /* PBXTextBookmark */ = 035AF36B10904DFE00725226 /* PBXTextBookmark */;
+ 035AF36C10904DFE00725226 /* PBXTextBookmark */ = 035AF36C10904DFE00725226 /* PBXTextBookmark */;
+ 035AF36D10904DFE00725226 /* PBXTextBookmark */ = 035AF36D10904DFE00725226 /* PBXTextBookmark */;
+ 035AF36E10904DFE00725226 /* PBXTextBookmark */ = 035AF36E10904DFE00725226 /* PBXTextBookmark */;
+ 035AF37310904E5C00725226 /* PBXTextBookmark */ = 035AF37310904E5C00725226 /* PBXTextBookmark */;
+ 035AF37410904E5C00725226 /* PBXTextBookmark */ = 035AF37410904E5C00725226 /* PBXTextBookmark */;
+ 035AF37510904E5C00725226 /* PBXTextBookmark */ = 035AF37510904E5C00725226 /* PBXTextBookmark */;
+ 035AF37A10904E8600725226 /* PBXTextBookmark */ = 035AF37A10904E8600725226 /* PBXTextBookmark */;
+ 035AF37B10904E8600725226 /* PBXTextBookmark */ = 035AF37B10904E8600725226 /* PBXTextBookmark */;
+ 035AF38110904ED000725226 /* PBXTextBookmark */ = 035AF38110904ED000725226 /* PBXTextBookmark */;
+ 035AF38710904F4A00725226 /* PBXTextBookmark */ = 035AF38710904F4A00725226 /* PBXTextBookmark */;
+ 035AF38810904F4A00725226 /* PBXTextBookmark */ = 035AF38810904F4A00725226 /* PBXTextBookmark */;
+ 035AF38910904F4A00725226 /* PBXTextBookmark */ = 035AF38910904F4A00725226 /* PBXTextBookmark */;
+ 035AF38A10904FA600725226 /* PBXTextBookmark */ = 035AF38A10904FA600725226 /* PBXTextBookmark */;
+ 035AF38B10904FA600725226 /* PBXTextBookmark */ = 035AF38B10904FA600725226 /* PBXTextBookmark */;
+ 035AF38C10904FA600725226 /* PBXTextBookmark */ = 035AF38C10904FA600725226 /* PBXTextBookmark */;
0381D4BB10865AF900072A80 = 0381D4BB10865AF900072A80 /* PBXBookmark */;
0381D4D510865E6400072A80 = 0381D4D510865E6400072A80 /* PBXTextBookmark */;
0381D4D610865E6400072A80 = 0381D4D610865E6400072A80 /* PBXTextBookmark */;
View
4 plugins/Packard Bugs/WorldView.h
@@ -14,8 +14,10 @@
@interface WorldView : NSView {
World *world;
+ int colorGene;
}
-@property(readwrite, retain) World *world;
+@property (readwrite, retain) World *world;
+@property (nonatomic, assign) int colorGene;
@end
View
5 plugins/Packard Bugs/WorldView.m
@@ -15,6 +15,7 @@
@implementation WorldView
@synthesize world;
+@synthesize colorGene;
- (void)dealloc;
{
@@ -72,9 +73,6 @@ - (void)drawRect:(NSRect)rect {
// color arrays
NSColor *bugsColor[world.population];
- // gene to color by
- int colorGene = 31;
-
// loop it, dj
int i = 0, j = 0;
Bug *bug;
@@ -92,7 +90,6 @@ - (void)drawRect:(NSRect)rect {
food_count++;
}
if(bug = cell.bug) {
-// bugsColor[bugs_count] = [NSColor redColor];
gene = [bug getMovementForGene:colorGene];
bugsColor[bugs_count] = [NSColor colorWithDeviceHue:rotationForPoint(gene.x, gene.y)
saturation:1.0

0 comments on commit d669182

Please sign in to comment.