-
Notifications
You must be signed in to change notification settings - Fork 0
/
NXMineView.h
84 lines (68 loc) · 1.46 KB
/
NXMineView.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
//
// NXMineView.h
// NXMines
//
// Created by GÖbor SebestyÝn on 2005.03.26..
// Copyright 2005 __MyCompanyName__. All rights reserved.
//
#ifdef _NEXT_SOURCE
#import <AppKit/AppKit.h>
#import <Foundation/Foundation.h>
#else
#import <Cocoa/Cocoa.h>
#endif
#define BEGINNER 0
#define MEDIUM 1
#define EXPERT 2
#define CHECKED 0x04
#define FLAG 0x08
#define INVALID 0x10
#define INTERVAL 1
#define PRIORITY 1
// void timer(DPSTimedEntry tEntry, double now, void *udata);
@interface NXMineView : NSView<NSFileManagerDelegate>
{
id bombDisplay;
id startButton;
id timeDisplay;
id scorePanel;
id name0;
id name1;
id name2;
id time0;
id time1;
id time2;
NSMutableArray *fieldsList;
int gameMode;
BOOL isRunning;
BOOL timerOn;
NSTimer *timer;
int bombs;
int flagsInBomb;
int fw, fh, fc;
int maxspc;
int temp;
id actTextField;
BOOL showAll;
}
// - postInit: sender;
-(void) tick: (NSTimer *) aTimer;
- (BOOL)acceptsFirstResponder;
- setBeginner:sender;
- setMedium:sender;
- setExpert:sender;
- setGameMode:(int)mode;
- initFieldsW:(int)w H:(int)h Bombs:(int)Bombs;
- startGame:sender;
- endGame:(BOOL)win;
-(void) buttonPushed: sender;
-(void) rightButtonPushed: sender;
-(int) tagOfX:(int)x Y:(int)y;
-(void) checkAtX:(int)xx Y:(int)yy;
-(void) checkOneAtX:(int)xx Y:(int)yy;
-(void) resetScores: sender;
-(void) loadScores;
-(void) saveScores;
/* text delegators */
- (void)textDidEndEditing:(NSNotification *)aNotification;
@end