Commits

Ivan Vučica  committed ba9b792

Larger play field. Sounds. Score label. Corrections in -findHole algorithm. Animated score floating effect.

  • Participants
  • Parent commits c336fbe

Comments (0)

Files changed (6)

File English.lproj/MainMenu.xib

 <archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.10">
 	<data>
 		<int key="IBDocument.SystemTarget">1060</int>
-		<string key="IBDocument.SystemVersion">11D50d</string>
+		<string key="IBDocument.SystemVersion">11E53</string>
 		<string key="IBDocument.InterfaceBuilderVersion">2182</string>
-		<string key="IBDocument.AppKitVersion">1138.32</string>
-		<string key="IBDocument.HIToolboxVersion">568.00</string>
+		<string key="IBDocument.AppKitVersion">1138.47</string>
+		<string key="IBDocument.HIToolboxVersion">569.00</string>
 		<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
 			<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin</string>
 			<string key="NS.object.0">2182</string>
 			<string>NSMenu</string>
 			<string>NSWindowTemplate</string>
 			<string>NSMenuItem</string>
+			<string>NSTextField</string>
+			<string>NSTextFieldCell</string>
 			<string>NSCustomView</string>
 			<string>NSButtonCell</string>
 			<string>NSButton</string>
 				<string key="NSName">_NSMainMenu</string>
 			</object>
 			<object class="NSWindowTemplate" id="972006081">
-				<int key="NSWindowStyleMask">15</int>
+				<int key="NSWindowStyleMask">7</int>
 				<int key="NSWindowBacking">2</int>
-				<string key="NSWindowRect">{{335, 390}, {480, 360}}</string>
+				<string key="NSWindowRect">{{335, 390}, {917, 570}}</string>
 				<int key="NSWTFlags">1954021376</int>
 				<string key="NSWindowTitle">SameGame</string>
 				<string key="NSWindowClass">NSWindow</string>
 				<nil key="NSViewClass"/>
 				<nil key="NSUserInterfaceItemIdentifier"/>
 				<object class="NSView" key="NSWindowView" id="439893737">
-					<nil key="NSNextResponder"/>
+					<reference key="NSNextResponder"/>
 					<int key="NSvFlags">256</int>
 					<object class="NSMutableArray" key="NSSubviews">
 						<bool key="EncodedWithXMLCoder">YES</bool>
 						<object class="NSCustomView" id="22355606">
 							<reference key="NSNextResponder" ref="439893737"/>
 							<int key="NSvFlags">274</int>
-							<string key="NSFrameSize">{340, 360}</string>
+							<object class="NSMutableArray" key="NSSubviews">
+								<bool key="EncodedWithXMLCoder">YES</bool>
+								<object class="NSTextField" id="301390082">
+									<reference key="NSNextResponder" ref="22355606"/>
+									<int key="NSvFlags">265</int>
+									<string key="NSFrame">{{551, 488}, {209, 62}}</string>
+									<reference key="NSSuperview" ref="22355606"/>
+									<reference key="NSWindow"/>
+									<reference key="NSNextKeyView" ref="44909600"/>
+									<int key="NSViewLayerContentsRedrawPolicy">2</int>
+									<string key="NSReuseIdentifierKey">_NS:1505</string>
+									<bool key="NSEnabled">YES</bool>
+									<object class="NSTextFieldCell" key="NSCell" id="621489320">
+										<int key="NSCellFlags">67239424</int>
+										<int key="NSCellFlags2">71303168</int>
+										<string key="NSContents">Score: 0</string>
+										<object class="NSFont" key="NSSupport">
+											<string key="NSName">Papyrus</string>
+											<double key="NSSize">33</double>
+											<int key="NSfFlags">16</int>
+										</object>
+										<string key="NSCellIdentifier">_NS:1505</string>
+										<reference key="NSControlView" ref="301390082"/>
+										<object class="NSColor" key="NSBackgroundColor">
+											<int key="NSColorSpace">6</int>
+											<string key="NSCatalogName">System</string>
+											<string key="NSColorName">controlColor</string>
+											<object class="NSColor" key="NSColor">
+												<int key="NSColorSpace">3</int>
+												<bytes key="NSWhite">MC42NjY2NjY2NjY3AA</bytes>
+											</object>
+										</object>
+										<object class="NSColor" key="NSTextColor">
+											<int key="NSColorSpace">3</int>
+											<bytes key="NSWhite">MQA</bytes>
+										</object>
+									</object>
+								</object>
+							</object>
+							<string key="NSFrameSize">{777, 570}</string>
 							<reference key="NSSuperview" ref="439893737"/>
+							<reference key="NSWindow"/>
+							<reference key="NSNextKeyView" ref="301390082"/>
 							<bool key="NSViewIsLayerTreeHost">YES</bool>
 							<int key="NSViewLayerContentsRedrawPolicy">2</int>
 							<string key="NSClassName">SGBoardView</string>
 						<object class="NSButton" id="44909600">
 							<reference key="NSNextResponder" ref="439893737"/>
 							<int key="NSvFlags">273</int>
-							<string key="NSFrame">{{338, -1}, {142, 362}}</string>
+							<string key="NSFrame">{{775, -1}, {142, 572}}</string>
 							<reference key="NSSuperview" ref="439893737"/>
+							<reference key="NSWindow"/>
+							<reference key="NSNextKeyView"/>
 							<int key="NSViewLayerContentsRedrawPolicy">2</int>
 							<bool key="NSEnabled">YES</bool>
 							<object class="NSButtonCell" key="NSCell" id="816715647">
 							</object>
 						</object>
 					</object>
-					<string key="NSFrameSize">{480, 360}</string>
+					<string key="NSFrameSize">{917, 570}</string>
+					<reference key="NSSuperview"/>
+					<reference key="NSWindow"/>
+					<reference key="NSNextKeyView" ref="22355606"/>
 					<bool key="NSViewIsLayerTreeHost">YES</bool>
 					<int key="NSViewLayerContentsRedrawPolicy">2</int>
 				</object>
 					</object>
 					<int key="connectionID">537</int>
 				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBOutletConnection" key="connection">
+						<string key="label">scoreLabel</string>
+						<reference key="source" ref="22355606"/>
+						<reference key="destination" ref="301390082"/>
+					</object>
+					<int key="connectionID">540</int>
+				</object>
 			</object>
 			<object class="IBMutableOrderedSet" key="objectRecords">
 				<object class="NSArray" key="orderedObjects">
 					<object class="IBObjectRecord">
 						<int key="objectID">534</int>
 						<reference key="object" ref="22355606"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="301390082"/>
+						</object>
 						<reference key="parent" ref="439893737"/>
 					</object>
 					<object class="IBObjectRecord">
 						<reference key="object" ref="816715647"/>
 						<reference key="parent" ref="44909600"/>
 					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">538</int>
+						<reference key="object" ref="301390082"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="621489320"/>
+						</object>
+						<reference key="parent" ref="22355606"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">539</int>
+						<reference key="object" ref="621489320"/>
+						<reference key="parent" ref="301390082"/>
+					</object>
 				</object>
 			</object>
 			<object class="NSMutableDictionary" key="flattenedProperties">
 					<string>534.IBPluginDependency</string>
 					<string>535.IBPluginDependency</string>
 					<string>536.IBPluginDependency</string>
+					<string>538.IBPluginDependency</string>
+					<string>539.IBPluginDependency</string>
 					<string>56.IBPluginDependency</string>
 					<string>57.IBPluginDependency</string>
 					<string>58.IBPluginDependency</string>
 					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 				</object>
 			</object>
 			<object class="NSMutableDictionary" key="unlocalizedProperties">
 				<reference key="dict.values" ref="0"/>
 			</object>
 			<nil key="sourceID"/>
-			<int key="maxID">537</int>
+			<int key="maxID">540</int>
 		</object>
-		<object class="IBClassDescriber" key="IBDocument.Classes"/>
+		<object class="IBClassDescriber" key="IBDocument.Classes">
+			<object class="NSMutableArray" key="referencedPartialClassDescriptions">
+				<bool key="EncodedWithXMLCoder">YES</bool>
+				<object class="IBPartialClassDescription">
+					<string key="className">SGBoardView</string>
+					<string key="superclassName">NSView</string>
+					<object class="NSMutableDictionary" key="outlets">
+						<string key="NS.key.0">scoreLabel</string>
+						<string key="NS.object.0">NSTextField</string>
+					</object>
+					<object class="NSMutableDictionary" key="toOneOutletInfosByName">
+						<string key="NS.key.0">scoreLabel</string>
+						<object class="IBToOneOutletInfo" key="NS.object.0">
+							<string key="name">scoreLabel</string>
+							<string key="candidateClassName">NSTextField</string>
+						</object>
+					</object>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBProjectSource</string>
+						<string key="minorKey">./Classes/SGBoardView.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">SameGameAppDelegate</string>
+					<string key="superclassName">NSObject</string>
+					<object class="NSMutableDictionary" key="outlets">
+						<string key="NS.key.0">window</string>
+						<string key="NS.object.0">NSWindow</string>
+					</object>
+					<object class="NSMutableDictionary" key="toOneOutletInfosByName">
+						<string key="NS.key.0">window</string>
+						<object class="IBToOneOutletInfo" key="NS.object.0">
+							<string key="name">window</string>
+							<string key="candidateClassName">NSWindow</string>
+						</object>
+					</object>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBProjectSource</string>
+						<string key="minorKey">./Classes/SameGameAppDelegate.h</string>
+					</object>
+				</object>
+			</object>
+		</object>
 		<int key="IBDocument.localizationMode">0</int>
 		<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaFramework</string>
 		<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">

File Resources/button.wav

Binary file added.

File Resources/ok.wav

Binary file added.

File SGBoardView.h

 
 #import <Cocoa/Cocoa.h>
 
+@class SGPelletView;
 
 @interface SGBoardView : NSView {
     NSMutableDictionary * _pellets;
+    int _score;
+    BOOL _enabled;
+    
+    NSSet * _previouslyHighlightedGroup;
+    
+    NSTextField * _scoreLabel;
 }
+@property (nonatomic, assign) int score;
+@property (nonatomic, assign) BOOL enabled;
+@property (nonatomic, retain) NSSet * previouslyHighlightedGroup;
+@property (nonatomic, assign) IBOutlet NSTextField * scoreLabel;
+-(NSSet*)pelletsOfSameColorFromPellet:(SGPelletView*)startPellet;
+-(int)scoreForPelletGroup:(NSSet*)pelletGroup;
+-(void)mouseEnteredPellet:(SGPelletView*)pellet;
+-(void)mouseExitedPellet:(SGPelletView*)pellet;
+-(void)mouseUpOnPellet:(SGPelletView*)pellet;
+-(void)mouseDownOnPellet:(SGPelletView*)pellet;
 
 @end

File SGBoardView.m

 #import "SGPelletView.h"
 #import <QuartzCore/QuartzCore.h>
 
-#define COUNTX 10
-#define COUNTY 10
+#define COUNTX 12
+#define COUNTY 12
 #define PXWIDTH 32
 #define PXHEIGHT 32
 
+const float disappearanceAnimationDuration = 0.5;
+const float floaterAnimationDuration = 1.8;
+
 @implementation SGBoardView
+@synthesize score=_score;
+@synthesize enabled=_enabled;
+@synthesize previouslyHighlightedGroup=_previouslyHighlightedGroup;
+@synthesize scoreLabel=_scoreLabel;
 
 -(id)initWithFrame:(NSRect)frameRect
 {
     if(!self)
         return nil;
     
+    self.enabled = YES;
+    
     self.wantsLayer = YES;
     _pellets = [[NSMutableDictionary dictionaryWithCapacity:COUNTX*COUNTY] retain];
     for(int j = 0; j < COUNTY; j++)
             [self addSubview:pellet];
         }
     }
-    
+        
     return self;
 }
 -(void)dealloc
         [self removeTrackingArea:area];
     }
     
+    self.scoreLabel = nil;
+    self.previouslyHighlightedGroup = nil;
+    
     [super dealloc];
 }
 -(void)viewDidMoveToWindow
                                                                  userInfo:nil] autorelease];
     [self addTrackingArea:trackingArea];
 }
+
 -(void)drawRect:(NSRect)dirtyRect
 {
     [[NSColor blackColor] setFill];
 
 ////////
 
--(NSArray*)pelletsOfSameColorFromPellet:(SGPelletView*)startPellet
+-(NSSet*)pelletsOfSameColorFromPellet:(SGPelletView*)startPellet
 {
-    NSMutableArray * returnValue = [NSMutableArray array];
+    NSMutableSet * returnValue = [NSMutableSet set];
     NSMutableArray * searchQueue = [NSMutableArray arrayWithObject:startPellet];
     while ([searchQueue count] > 0) 
     {
                             break;
                         
                     }
+                    
+                    // apply new spot
                     NSPoint newPt3 = NSMakePoint(i, l+1);
                     NSString * newPt3Str = NSStringFromPoint(newPt3);
                     
                     [_pellets removeObjectForKey:pt3Str];
                     [_pellets setObject:p3 forKey:newPt3Str];
-                    p3.layer.position = (CGPoint){p3.layer.position.x, newPt3.y * PXHEIGHT};
+                    p3.layer.position = (CGPoint){p3.layer.position.x, newPt3.y * PXHEIGHT}; // automatically animates
                     p3.identifier = newPt3Str;
                     
                     p3.frame = (NSRect){ 
                     
                     
                 }
+                
+                // if by now the pellet is still kept in the dictionary,
+                // that means it was not replaced, yet it still must be
+                // removed.
+                if(p.identifier && [_pellets valueForKey:p.identifier] == p)
+                    [_pellets removeObjectForKey:p.identifier];
+
             }
         }
     }
-    
-    
-}
-
-- (IBAction)deblah:(id)sender
-{
-    NSLog(@"%@", [_pellets objectForKey:NSStringFromPoint(NSMakePoint(2, 2))]);
 }
 
 -(void)mouseDownOnPellet:(SGPelletView*)pellet
 {
-    NSArray * pelletsOfSameColor = [self pelletsOfSameColorFromPellet:pellet];
+    NSSet * pelletsOfSameColor = [self pelletsOfSameColorFromPellet:pellet];
     if(pelletsOfSameColor.count < 3)
     {
         NSBeep();
         return;
     }
     
+    float minX = self.frame.size.width, minY = self.frame.size.height;
+    float maxX = 0, maxY = 0;
+    
     for(SGPelletView * p in pelletsOfSameColor)
     {
         CABasicAnimation* animation = [CABasicAnimation animationWithKeyPath: @"transform"];
         CATransform3D destination = CATransform3DMakeTranslation(p.frame.size.width/2, p.frame.size.height/2, 0);
         destination = CATransform3DScale(destination, 0.001, 0.001, 0.001);
         animation.toValue = [NSValue valueWithCATransform3D:destination];
-        animation.duration = 0.5;
+        animation.duration = disappearanceAnimationDuration;
         animation.removedOnCompletion = NO;
         animation.fillMode = kCAFillModeForwards;
         [p.layer addAnimation:animation forKey:@"transform"];
         p.highlighted = NO;
         p.alive = NO;
         
-        [p performSelector:@selector(removeFromSuperview) withObject:nil afterDelay:0.5];
+        [p performSelector:@selector(removeFromSuperview) withObject:nil afterDelay:disappearanceAnimationDuration];
+        
+        float left = p.frame.origin.x;
+        float top = p.frame.origin.y + p.frame.size.height;
+        float right = p.frame.origin.x + p.frame.size.width;
+        float bottom = p.frame.origin.y;
+        
+        float centerX = (left + right) / 2;
+        float centerY = (top + bottom) / 2;
+        
+        if(centerX < minX)
+            minX = centerX;
+        if(centerX > maxX)
+            maxX = centerX;
+        if(centerY < minY)
+            minY = centerY;
+        if(centerY > maxY)
+            maxY = centerY;
         
     }
-    [self findHoles];
     
-    //[self performSelector:@selector(findHoles) withObject:nil afterDelay:0.5];
+    // floating text
+    float centerX = (minX + maxX) / 2;
+    float centerY = (minY + maxY) / 2;
+    
+    int score = [self scoreForPelletGroup:pelletsOfSameColor];
+    
+    CGColorRef blackColor = CGColorGetConstantColor(kCGColorBlack);
+    CGColorRef orangeColor = CGColorCreateGenericRGB(1., 0.6, 0.2, 1.);
+    
+    CGColorRef backgroundColor = CGColorCreateGenericRGB(0, 0, 0, 0.4);
+    
+    CATextLayer * floatingTextLayer = [[CATextLayer alloc] init];
+    //[floatingTextLayer setBackgroundColor:blackColor];
+    [floatingTextLayer setString:[NSString stringWithFormat:@"%d", score]];
+    [floatingTextLayer setShadowColor:blackColor];
+    [floatingTextLayer setShadowOffset:CGSizeMake(2, 2)];
+    [floatingTextLayer setShadowOpacity:1];
+    [floatingTextLayer setShadowRadius:0];
+    [floatingTextLayer setFont:[NSFont fontWithName:@"Papyrus" size:14]];
+    [floatingTextLayer setFontSize:60];
+    //[floatingTextLayer setBorderColor:blackColor];
+    //[floatingTextLayer setBorderWidth:2];
+    [floatingTextLayer setBounds:CGRectMake(0, 0, 100, 65)];
+    [floatingTextLayer setPosition:CGPointMake(centerX, centerY)];
+    [floatingTextLayer setAlignmentMode:kCAAlignmentCenter];
+    [self.layer addSublayer:floatingTextLayer];
+    
+    CABasicAnimation* floaterOpacityAnimation = [CABasicAnimation animationWithKeyPath: @"opacity"];
+    floaterOpacityAnimation.fromValue = [NSNumber numberWithFloat:1.8];
+    floaterOpacityAnimation.toValue = [NSNumber numberWithFloat:0];
+    floaterOpacityAnimation.duration = floaterAnimationDuration;
+    floaterOpacityAnimation.removedOnCompletion = NO;
+    floaterOpacityAnimation.fillMode = kCAFillModeForwards;
+    [floatingTextLayer addAnimation:floaterOpacityAnimation forKey:@"opacity"];
+    
+    CABasicAnimation* floaterPositionAnimation = [CABasicAnimation animationWithKeyPath: @"position"];
+    floaterPositionAnimation.fromValue = [NSValue valueWithPoint:NSMakePoint(centerX, centerY)];
+    floaterPositionAnimation.toValue = [NSValue valueWithPoint:NSMakePoint(centerX, centerY + 100)];
+    floaterPositionAnimation.duration = floaterAnimationDuration;
+    floaterPositionAnimation.removedOnCompletion = NO;
+    floaterPositionAnimation.fillMode = kCAFillModeForwards;
+    [floatingTextLayer addAnimation:floaterPositionAnimation forKey:@"position"];
+    
+    [floatingTextLayer performSelector:@selector(removeFromSuperlayer) withObject:nil afterDelay:floaterAnimationDuration];
+    
+    [floatingTextLayer release];
+    CGColorRelease(orangeColor);
+    
+    // stone drop animation
+    //[self findHoles];
+    [self performSelector:@selector(findHoles) withObject:nil afterDelay:disappearanceAnimationDuration];
+    
+    // check if game is over
+    [self performSelector:@selector(checkIfGameIsOver) withObject:nil afterDelay:MAX(disappearanceAnimationDuration, floaterAnimationDuration)+0.5];
+    
+    // add score
+    self.score += score;
+    [self updateScoreLabel];
+
+    // disable user interaction for a while
+    self.enabled = NO;    
+    [self performSelector:@selector(reenable)
+               withObject:nil
+               afterDelay:disappearanceAnimationDuration];
+    
+    // play sound
+    [[NSSound soundNamed:@"ok"] play];
+    
 }
 -(void)mouseUpOnPellet:(SGPelletView*)pellet
 {
 }
 -(void)mouseEnteredPellet:(SGPelletView*)pellet
-{    
-    NSArray * pelletsOfSameColor = [self pelletsOfSameColorFromPellet:pellet];
-    if(pelletsOfSameColor.count < 3)
+{
+    if(!self.enabled)
     {
         return;
     }
-
+    
+    NSSet * pelletsOfSameColor = [self pelletsOfSameColorFromPellet:pellet];
+    if(pelletsOfSameColor.count < 3)
+    {
+        self.previouslyHighlightedGroup = nil;
+        return;
+    }
+    
+    if(![self.previouslyHighlightedGroup containsObject:pellet])
+        [[NSSound soundNamed:@"button"] play];
+    self.previouslyHighlightedGroup = pelletsOfSameColor;
+    
     for(SGPelletView * p in pelletsOfSameColor)
     {
         p.highlighted = YES;
-        p.toolTip = [NSString stringWithFormat:@"%d", (int)pow(pelletsOfSameColor.count-1, 2)];
     }
 }
 -(void)mouseExitedPellet:(SGPelletView*)pellet
 {
-    NSArray * pelletsOfSameColor = [self pelletsOfSameColorFromPellet:pellet];
+    NSSet * pelletsOfSameColor = [self pelletsOfSameColorFromPellet:pellet];
     for(SGPelletView * p in pelletsOfSameColor)
     {
         p.highlighted = NO;
     }
 }
+
+-(int)scoreForPelletGroup:(NSSet*)pelletGroup
+{
+    return (int)pow(pelletGroup.count-1, 2);
+}
+
+-(BOOL)isGameOver
+{
+    for(SGPelletView* pelletView in self.subviews)
+    {
+        if(![pelletView isKindOfClass:[SGPelletView class]])
+            continue;
+        
+        if([self pelletsOfSameColorFromPellet:pelletView].count >= 3)
+            return NO;
+    }
+    return YES;
+}
+-(void)checkIfGameIsOver
+{
+    if([self isGameOver])
+    {
+        NSRunAlertPanel(@"Game over", @"Your score is %d. Restart the app for a new game.", @"Ok", nil, nil, self.score);
+    }
+}
+-(void)reenable
+{
+    // helper function for use with performSelector:withObject:afterDelay:
+    
+    [self setEnabled:YES];
+}
+- (void)updateScoreLabel
+{
+    self.scoreLabel.stringValue = [NSString stringWithFormat:@"Score: %d", self.score];
+}
 @end

File SameGame.xcodeproj/project.pbxproj

 /* Begin PBXBuildFile section */
 		1DDD58160DA1D0A300B32029 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1DDD58140DA1D0A300B32029 /* MainMenu.xib */; };
 		256AC3DA0F4B6AC300CF3369 /* SameGameAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 256AC3D90F4B6AC300CF3369 /* SameGameAppDelegate.m */; };
+		7F94F830156263BC002DEE9B /* button.wav in Resources */ = {isa = PBXBuildFile; fileRef = 7F94F82E156263BC002DEE9B /* button.wav */; };
+		7F94F831156263BC002DEE9B /* ok.wav in Resources */ = {isa = PBXBuildFile; fileRef = 7F94F82F156263BC002DEE9B /* ok.wav */; };
 		7FD9CA9515066E34007C4B36 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7FD9CA9415066E34007C4B36 /* QuartzCore.framework */; };
 		7FD9CA9D15066E60007C4B36 /* SGPelletView.m in Sources */ = {isa = PBXBuildFile; fileRef = 7FD9CA9C15066E60007C4B36 /* SGPelletView.m */; };
 		7FD9CAA415067055007C4B36 /* pellet_black.png in Resources */ = {isa = PBXBuildFile; fileRef = 7FD9CAA215067055007C4B36 /* pellet_black.png */; };
 		1DDD58150DA1D0A300B32029 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/MainMenu.xib; sourceTree = "<group>"; };
 		256AC3D80F4B6AC300CF3369 /* SameGameAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SameGameAppDelegate.h; sourceTree = "<group>"; };
 		256AC3D90F4B6AC300CF3369 /* SameGameAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SameGameAppDelegate.m; sourceTree = "<group>"; };
-		256AC3F00F4B6AF500CF3369 /* SameGame_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; path = SameGame_Prefix.pch; sourceTree = "<group>"; };
+		256AC3F00F4B6AF500CF3369 /* SameGame_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SameGame_Prefix.pch; sourceTree = "<group>"; };
 		29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
 		29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; };
 		29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = "<absolute>"; };
+		7F94F82E156263BC002DEE9B /* button.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; name = button.wav; path = Resources/button.wav; sourceTree = "<group>"; };
+		7F94F82F156263BC002DEE9B /* ok.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; name = ok.wav; path = Resources/ok.wav; sourceTree = "<group>"; };
 		7FD9CA9415066E34007C4B36 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
 		7FD9CA9B15066E60007C4B36 /* SGPelletView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SGPelletView.h; sourceTree = "<group>"; };
 		7FD9CA9C15066E60007C4B36 /* SGPelletView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SGPelletView.m; sourceTree = "<group>"; };
 		7FD9CAA315067055007C4B36 /* pellet_white.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = pellet_white.png; path = Resources/pellet_white.png; sourceTree = "<group>"; };
 		7FD9CAAB1506713B007C4B36 /* SGBoardView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SGBoardView.h; sourceTree = "<group>"; };
 		7FD9CAAC1506713B007C4B36 /* SGBoardView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SGBoardView.m; sourceTree = "<group>"; };
-		8D1107310486CEB800E47090 /* SameGame-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; path = "SameGame-Info.plist"; sourceTree = "<group>"; };
+		8D1107310486CEB800E47090 /* SameGame-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "SameGame-Info.plist"; sourceTree = "<group>"; };
 		8D1107320486CEB800E47090 /* SameGame.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SameGame.app; sourceTree = BUILT_PRODUCTS_DIR; };
 /* End PBXFileReference section */
 
 		29B97317FDCFA39411CA2CEA /* Resources */ = {
 			isa = PBXGroup;
 			children = (
+				7F94F82E156263BC002DEE9B /* button.wav */,
+				7F94F82F156263BC002DEE9B /* ok.wav */,
 				7FD9CAA215067055007C4B36 /* pellet_black.png */,
 				7FD9CAA315067055007C4B36 /* pellet_white.png */,
 				8D1107310486CEB800E47090 /* SameGame-Info.plist */,
 				1DDD58160DA1D0A300B32029 /* MainMenu.xib in Resources */,
 				7FD9CAA415067055007C4B36 /* pellet_black.png in Resources */,
 				7FD9CAA515067055007C4B36 /* pellet_white.png in Resources */,
+				7F94F830156263BC002DEE9B /* button.wav in Resources */,
+				7F94F831156263BC002DEE9B /* ok.wav in Resources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};