-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathAppController.h
More file actions
executable file
·59 lines (49 loc) · 1.32 KB
/
Copy pathAppController.h
File metadata and controls
executable file
·59 lines (49 loc) · 1.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
//
// AppController.h
// CocoaPictionary
//
// Created by Jason on 10/17/09.
// Copyright 2009 TokBox Inc.. All rights reserved.
//
#import <Cocoa/Cocoa.h>
#import "PictionaryModel.h"
#import "MyViewController.h"
#import "WTView.h"
#define GAME_LENGTH 60
typedef enum appState
{
STATE_STOP, STATE_DRAWING, STATE_GOT_ANSWER, STATE_TIME_UP
} app_state;
@interface AppController : NSObject {
IBOutlet NSView *drawArea;
IBOutlet NSTextField *timerLabel;
IBOutlet NSTextField *statusMessage;
IBOutlet NSTextField *answerField;
IBOutlet NSTextField *scoreLabel;
IBOutlet NSView *buttonView;
IBOutlet NSView *answerView;
IBOutlet NSButton *timeUp;
IBOutlet NSButton *gotIt;
IBOutlet NSButton *startButton;
app_state current_state;
PictionaryModel *pictionary;
NSTimer *timer;
int time_left;
}
- (IBAction)got_it_clicked:(id)sender;
- (IBAction)a_clicked:(id)sender;
- (IBAction)b_clicked:(id)sender;
- (IBAction)c_clicked:(id)sender;
- (IBAction)d_clicked:(id)sender;
- (IBAction)e_clicked:(id)sender;
- (IBAction)f_clicked:(id)sender;
- (IBAction)times_up_clicked:(id)sender;
- (IBAction)start_clicked:(id)sender;
-(void)update_ui_from_state;
-(void)update_timer;
-(void)reset_timer;
-(void)stop_timer;
-(void)save_image:(NSString*)player;
-(NSString *)generate_status_message;
-(NSString *)generate_score_message;
@end