comparison TimedSessionController.mm @ 30:c0a6f7c66719

Josh M test "in house" version 0.1
author Robert Tubb <rt300@eecs.qmul.ac.uk>
date Wed, 27 Feb 2013 11:39:07 +0000
parents fabb3a5cdfc9
children 23ef179c3748
comparison
equal deleted inserted replaced
29:fabb3a5cdfc9 30:c0a6f7c66719
7 // 7 //
8 #import "testApp.h" 8 #import "testApp.h"
9 #import "TimedSessionController.h" 9 #import "TimedSessionController.h"
10 @interface TimedSessionController() 10 @interface TimedSessionController()
11 // private stuff 11 // private stuff
12
13 @end 12 @end
14 13
15 @implementation TimedSessionController 14 @implementation TimedSessionController
16 15
17 int orders[6][3] = {{0,1,2},{0,2,1},{1,0,2},{1,2,0},{2,0,1},{2,1,0}}; 16 int orders[6][3] = {{0,1,2},{0,2,1},{1,0,2},{1,2,0},{2,0,1},{2,1,0}};
54 53
55 54
56 -(void)showNextPrompt{ 55 -(void)showNextPrompt{
57 NSString *themessage; 56 NSString *themessage;
58 scount++; 57 scount++;
58 ((testApp *)self.theOFAppRef)->moveVel = TwoVector(); // stops movement
59 if(scount < 3){ 59 if(scount < 3){
60 themessage = [alertMessages objectAtIndex:orders[theOrder][scount] ]; 60 themessage = [alertMessages objectAtIndex:orders[theOrder][scount] ];
61 }else{ 61 }else{
62 themessage = [alertMessages objectAtIndex:3 ]; 62 themessage = [alertMessages objectAtIndex:3 ];
63 } 63 }
83 83
84 NSLog(@"OK TO NEXT VIEW"); 84 NSLog(@"OK TO NEXT VIEW");
85 85
86 if(scount < 3){ 86 if(scount < 3){
87 NSInteger next = orders[theOrder][scount]; 87 NSInteger next = orders[theOrder][scount];
88
88 ((testApp *)self.theOFAppRef)->interfaceSelected(next); 89 ((testApp *)self.theOFAppRef)->interfaceSelected(next);
89 90
90 self.theCurrentTimer = [NSTimer scheduledTimerWithTimeInterval:SECONDS_PER_INTERFACE target:self selector:@selector(showNextPrompt) userInfo:nil repeats:NO]; 91 self.theCurrentTimer = [NSTimer scheduledTimerWithTimeInterval:SECONDS_PER_INTERFACE target:self selector:@selector(showNextPrompt) userInfo:nil repeats:NO];
91 92
92 }else{ 93 }else{