-
Notifications
You must be signed in to change notification settings - Fork 1
/
MyController.h
65 lines (52 loc) · 1.16 KB
/
MyController.h
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
60
61
62
63
64
65
#include <time.h>
#import <Cocoa/Cocoa.h>
#import "OpenGLScreenReader.h"
#import "myView.h"
#define MAXSWAPS 100
typedef struct swap {
int x1;
int y1;
int x2;
int y2;
BOOL isMultiplier;
BOOL isSpecial;
} Swap;
@interface MyController : NSObject
{
@public
OpenGLScreenReader *mOpenGLScreenReader;
NSWindow *mWindow;
MyView *mView;
int captureX, captureY;
Block board[9][9];
Block oldBoard[8][8];
BOOL shift;
Swap mSwaps[MAXSWAPS];
id oldResponder;
int swaps,delay,turbotime;
time_t mStart;
NSTimer *mTimer;
IBOutlet id mainWindow;
IBOutlet id maxSwaps;
IBOutlet id turnDelay;
IBOutlet id turboTime;
}
- (IBAction)screenSnapshot:(id)sender;
- (IBAction)makeMove:(id)sender;
- (IBAction)showWindow:(id)sender;
- (IBAction)hideWindow:(id)sender;
- (IBAction)oneShot:(id)sender;
- (IBAction)left:(id)sender;
- (IBAction)right:(id)sender;
- (IBAction)up:(id)sender;
- (IBAction)down:(id)sender;
- (IBAction)configChange:(id)sender;
- (void)flagsChanged:(NSEvent *)theEvent;
- (BOOL) isBoardStable;
- (void) initWindow;
- (void) captureBoard;
- (void) collapseMoves;
- (void) executeSwap:(Swap)swap;
- (void) bringGameToFront;
- (void) findMoves;
@end