check some todos
[exterlulz-kokogems.git] / src / Game.h
blobffd1b6f3ca741434868c0bc6b405d4142f18dafc
1 /* ----====----====----====----====----====----====----====----====----====----
2 Game.h (jeweltoy)
4 JewelToy is a simple game played against the clock.
5 Copyright (C) 2001 Giles Williams
7 This program is free software; you can redistribute it and/or
8 modify it under the terms of the GNU General Public License
9 as published by the Free Software Foundation; either version 2
10 of the License, or (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20 ----====----====----====----====----====----====----====----====----====---- */
22 #import <Cocoa/Cocoa.h>
24 @class Gem;
26 @interface Game : NSObject
28 // MW...
30 NSMutableArray *scoreBubbles;
32 Gem *board[8][8];
33 int sx1,sy1,sx2,sy2, hintx, hinty;
34 int score, bonusMultiplier, gemsFaded;
35 // CASCADE BONUS
36 int cascade;
38 BOOL muted;
41 - (id) init;
42 - (id) initWithImagesFrom:(NSArray *) imageArray;
43 - (id) initWithSpritesFrom:(NSArray *) spriteArray;
44 - (void) dealloc;
46 - (void) setImagesFrom:(NSArray *) imageArray;
47 - (void) setSpritesFrom:(NSArray *) spriteArray;
49 - (int) randomGemTypeAt:(int)x :(int)y;
50 - (Gem *) gemAt:(int)x :(int)y;
51 - (NSMutableArray *)scoreBubbles;
53 - (void) setMuted:(BOOL)value;
55 - (void) swap:(int) x1 :(int) y1 and:(int) x2:(int) y2;
56 - (void) unswap;
58 - (BOOL) testForThreeAt:(int) x :(int) y;
59 - (BOOL) checkForThreeAt:(int) x :(int) y;
60 - (BOOL) finalTestForThreeAt:(int) x :(int) y;
61 - (BOOL) checkBoardForThrees;
62 - (BOOL) boardHasMoves;
63 - (void) showAllBoardMoves;
65 - (void) removeFadedGemsAndReorganiseWithImagesFrom:(NSArray *) imageArray;
66 - (void) removeFadedGemsAndReorganiseWithSpritesFrom:(NSArray *) spriteArray;
67 - (void) shake;
68 - (void) erupt;
69 - (void) explodeGameOver;
70 - (void) wholeNewGameWithImagesFrom:(NSArray *) imageArray;
71 - (void) wholeNewGameWithSpritesFrom:(NSArray *) spriteArray;
73 - (NSPoint) hintPoint;
74 - (int) score;
75 - (float) collectGemsFaded;
76 - (int) bonusMultiplier;
77 - (void) increaseBonusMultiplier;
79 @end