Allan Davis avatar Allan Davis committed 5c384ed

Starting the game spec

Comments (0)

Files changed (9)

code/HuntTheWumpus/HuntTheWumpus.xcodeproj/project.pbxproj

 		4E46ABD8161155A8006592D7 /* Game.m in Sources */ = {isa = PBXBuildFile; fileRef = 4E46ABD7161155A8006592D7 /* Game.m */; };
 		4E46ABD9161155A8006592D7 /* Game.m in Sources */ = {isa = PBXBuildFile; fileRef = 4E46ABD7161155A8006592D7 /* Game.m */; };
 		4E46ABE1161161DC006592D7 /* GameSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 4E46ABE0161161DC006592D7 /* GameSpec.m */; };
+		CED42A0B16128EC6008E24E7 /* EntitySpec.m in Sources */ = {isa = PBXBuildFile; fileRef = CED42A0A16128EC6008E24E7 /* EntitySpec.m */; };
+		CED42A0F16128F01008E24E7 /* Entity.m in Sources */ = {isa = PBXBuildFile; fileRef = CED42A0E16128F01008E24E7 /* Entity.m */; };
+		CED42A1016128F01008E24E7 /* Entity.m in Sources */ = {isa = PBXBuildFile; fileRef = CED42A0E16128F01008E24E7 /* Entity.m */; };
 		D1273479777047BF9CE29AC8 /* libPods-test.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CB58754371D54EE5B4FCAE36 /* libPods-test.a */; };
 /* End PBXBuildFile section */
 
+/* Begin PBXContainerItemProxy section */
+		CED42A111612B891008E24E7 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 4E46ABA016111B48006592D7 /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = 4E46ABA816111B48006592D7;
+			remoteInfo = HuntTheWumpus;
+		};
+/* End PBXContainerItemProxy section */
+
 /* Begin PBXCopyFilesBuildPhase section */
 		4E46ABA716111B48006592D7 /* CopyFiles */ = {
 			isa = PBXCopyFilesBuildPhase;
 		4E46ABD7161155A8006592D7 /* Game.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = Game.m; path = models/Game.m; sourceTree = "<group>"; };
 		4E46ABE0161161DC006592D7 /* GameSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GameSpec.m; sourceTree = "<group>"; };
 		CB58754371D54EE5B4FCAE36 /* libPods-test.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-test.a"; sourceTree = BUILT_PRODUCTS_DIR; };
+		CED42A0A16128EC6008E24E7 /* EntitySpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EntitySpec.m; sourceTree = "<group>"; };
+		CED42A0D16128F01008E24E7 /* Entity.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Entity.h; path = models/Entity.h; sourceTree = "<group>"; };
+		CED42A0E16128F01008E24E7 /* Entity.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = Entity.m; path = models/Entity.m; sourceTree = "<group>"; };
 		ECD265712D6D4BA3A3C19E38 /* Pods-test.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-test.xcconfig"; path = "Pods/Pods-test.xcconfig"; sourceTree = SOURCE_ROOT; };
 /* End PBXFileReference section */
 
 			children = (
 				4E46ABCA16111D81006592D7 /* Supporting Files */,
 				4E46ABE0161161DC006592D7 /* GameSpec.m */,
+				CED42A0A16128EC6008E24E7 /* EntitySpec.m */,
 			);
 			path = HuntTheWumpusTests;
 			sourceTree = "<group>";
 		4E46ABDA161155DF006592D7 /* models */ = {
 			isa = PBXGroup;
 			children = (
+				CED42A0D16128F01008E24E7 /* Entity.h */,
+				CED42A0E16128F01008E24E7 /* Entity.m */,
 				4E46ABD6161155A8006592D7 /* Game.h */,
 				4E46ABD7161155A8006592D7 /* Game.m */,
 			);
 			buildRules = (
 			);
 			dependencies = (
+				CED42A121612B891008E24E7 /* PBXTargetDependency */,
 			);
 			name = HuntTheWumpusTests;
 			productName = HuntTheWumpusTests;
 			files = (
 				4E46ABB116111B48006592D7 /* main.m in Sources */,
 				4E46ABD8161155A8006592D7 /* Game.m in Sources */,
+				CED42A0F16128F01008E24E7 /* Entity.m in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
 			files = (
 				4E46ABD9161155A8006592D7 /* Game.m in Sources */,
 				4E46ABE1161161DC006592D7 /* GameSpec.m in Sources */,
+				CED42A0B16128EC6008E24E7 /* EntitySpec.m in Sources */,
+				CED42A1016128F01008E24E7 /* Entity.m in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
 /* End PBXSourcesBuildPhase section */
 
+/* Begin PBXTargetDependency section */
+		CED42A121612B891008E24E7 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = 4E46ABA816111B48006592D7 /* HuntTheWumpus */;
+			targetProxy = CED42A111612B891008E24E7 /* PBXContainerItemProxy */;
+		};
+/* End PBXTargetDependency section */
+
 /* Begin PBXVariantGroup section */
 		4E46ABCC16111D81006592D7 /* InfoPlist.strings */ = {
 			isa = PBXVariantGroup;

code/HuntTheWumpus/HuntTheWumpus/models/Entity.h

+//
+//  Entity.h
+//  HuntTheWumpus
+//
+//  Created by Allan Davis on 9/25/12.
+//  Copyright (c) 2012 Cajun Code. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+@interface Entity : NSObject
+
+@end

code/HuntTheWumpus/HuntTheWumpus/models/Entity.m

+//
+//  Entity.m
+//  HuntTheWumpus
+//
+//  Created by Allan Davis on 9/25/12.
+//  Copyright (c) 2012 Cajun Code. All rights reserved.
+//
+
+#import "Entity.h"
+
+@implementation Entity
+
+@end

code/HuntTheWumpus/HuntTheWumpus/models/Game.h

 #import <Foundation/Foundation.h>
 
 @interface Game : NSObject
+@property BOOL gameRunning;
+
++ (void)startLoop;
 
 @end

code/HuntTheWumpus/HuntTheWumpus/models/Game.m

 
 @implementation Game
 
++ (void) startLoop{
+    static Game * game = [[Game alloc]init];
+    while (game.gameRunning) {
+        [game clearTheScreen];
+        [game updateTheData];
+    }
+}
+
 @end

code/HuntTheWumpus/HuntTheWumpusTests/EntitySpec.m

+#import <Kiwi/Kiwi.h>
+#import "Entity.h"
+
+SPEC_BEGIN(EntitySpec)
+    describe(@"Entity", ^{
+        context(@"existance", ^{
+            it(@"should be creatiable", ^{
+                
+            });
+        });
+        it(@"should do somthing", ^{
+            
+        });
+    });
+SPEC_END

code/HuntTheWumpus/HuntTheWumpusTests/GameSpec.m

 
 SPEC_BEGIN(GameSpec)
     describe(@"Game", ^{
-        it(@"manage game loop", ^{
-            
+        context(@"gameloop", ^{
+            it(@"should make sure the screen is clear before drawing", ^{
+                Game *game = [[Game alloc]init];
+                [[game should] receive:@selector(clearTheScreen)];
+                [game startLoop];
+            });
+            it(@"should gather the input", ^{
+                
+            });
+            it(@"should update the game data", ^{
+                
+            });
+            it(@"should draw the game", ^{});
+            it(@"should allow breaking of the game loop", ^{});
         });
+        
     });
 SPEC_END
Add a comment to this file

presentations/Introduction.odp

Binary file added.

Empty file added.

Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.