git repos / blockattack-game

blame: source/code/BlockGame.hpp

normal view · raw

89c4a3a6 sago007 2008-08-29 14:32 1
/*
c53e6443 sago007 2012-04-17 11:04 2
===========================================================================
c53e6443 sago007 2012-04-17 11:04 3
blockattack - Block Attack - Rise of the Blocks
c53e6443 sago007 2012-04-17 11:04 4
Copyright (C) 2005-2012 Poul Sander
c53e6443 sago007 2012-04-17 11:04 5
c53e6443 sago007 2012-04-17 11:04 6
This program is free software: you can redistribute it and/or modify
c53e6443 sago007 2012-04-17 11:04 7
it under the terms of the GNU General Public License as published by
c53e6443 sago007 2012-04-17 11:04 8
the Free Software Foundation, either version 2 of the License, or
c53e6443 sago007 2012-04-17 11:04 9
(at your option) any later version.
c53e6443 sago007 2012-04-17 11:04 10
c53e6443 sago007 2012-04-17 11:04 11
This program is distributed in the hope that it will be useful,
c53e6443 sago007 2012-04-17 11:04 12
but WITHOUT ANY WARRANTY; without even the implied warranty of
c53e6443 sago007 2012-04-17 11:04 13
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
c53e6443 sago007 2012-04-17 11:04 14
GNU General Public License for more details.
c53e6443 sago007 2012-04-17 11:04 15
c53e6443 sago007 2012-04-17 11:04 16
You should have received a copy of the GNU General Public License
c53e6443 sago007 2012-04-17 11:04 17
along with this program.  If not, see http://www.gnu.org/licenses/
c53e6443 sago007 2012-04-17 11:04 18
c53e6443 sago007 2012-04-17 11:04 19
Source information and contacts persons can be found at
7ac8aa4b sago007 2016-02-22 19:25 20
http://www.blockattack.net
c53e6443 sago007 2012-04-17 11:04 21
===========================================================================
c53e6443 sago007 2012-04-17 11:04 22
*/
89c4a3a6 sago007 2008-08-29 14:32 23
17916a2e sago007 2010-11-07 11:26 24
#ifndef BLOCKGAME_HPP
17916a2e sago007 2010-11-07 11:26 25
#define BLOCKGAME_HPP 1
17916a2e sago007 2010-11-07 11:26 26
32c9b349 sago007 2008-11-20 18:14 27
#include "stats.h"
32c9b349 sago007 2008-11-20 18:14 28
#include "common.h"
17916a2e sago007 2010-11-07 11:26 29
17916a2e sago007 2010-11-07 11:26 30
#define NUMBEROFCHAINS 100
69862ef6 sago007 2015-08-22 17:24 31
#define BLOCKWAIT 100000
69862ef6 sago007 2015-08-22 17:24 32
#define BLOCKHANG 1000
32c9b349 sago007 2008-11-20 18:14 33
a1072daf sago007 2016-02-20 12:47 34
enum stageButton {SBdontShow, SBstageClear, SBpuzzleMode};
a1072daf sago007 2016-02-20 12:47 35
a1072daf sago007 2016-02-20 12:47 36
extern stageButton stageButtonStatus;
a1072daf sago007 2016-02-20 12:47 37
a1072daf sago007 2016-02-20 12:47 38
//This is the size of the blocks. They are always 50. The internal logic calculates it that way
a1072daf sago007 2016-02-20 12:47 39
const int bsize = 50;
a1072daf sago007 2016-02-20 12:47 40
5159dd90 sago007 2016-02-21 15:50 41
/**
5159dd90 sago007 2016-02-21 15:50 42
 * This struct defines the start conditions of the game
5159dd90 sago007 2016-02-21 15:50 43
 */
5159dd90 sago007 2016-02-21 15:50 44
struct BlockGameStartInfo {
5159dd90 sago007 2016-02-21 15:50 45
	unsigned int ticks = 0;
5159dd90 sago007 2016-02-21 15:50 46
	bool timeTrial = false;
b256fda5 sago007 2016-02-21 16:21 47
	///True means a stage clear game will be started. level must be set too.
b1fe2ae5 sago007 2016-02-21 16:01 48
	bool stageClear = false;
b256fda5 sago007 2016-02-21 16:21 49
	///True if puzzle mode. level must be set too.
b256fda5 sago007 2016-02-21 16:21 50
	bool puzzleMode = false;
83e4f8fe sago007 2016-02-22 19:22 51
	///Single puzzle is used for the editor only.
83e4f8fe sago007 2016-02-22 19:22 52
	bool singlePuzzle = false;
b1fe2ae5 sago007 2016-02-21 16:01 53
	int level = 0;
1e5aff60 sago007 2016-02-21 18:23 54
	bool AI = false;
50cf6485 sago007 2016-03-21 19:11 55
	bool recordStats = true;
1e5aff60 sago007 2016-02-21 18:23 56
	bool vsMode = false;
917dac61 sago007 2016-02-21 20:01 57
	int startBlocks = -1;
3e7b8813 sago007 2016-02-22 19:45 58
	int handicap = 0;
3e7b8813 sago007 2016-02-22 19:45 59
	int gameSpeed = 0;
1e5aff60 sago007 2016-02-21 18:23 60
};
1e5aff60 sago007 2016-02-21 18:23 61
1e5aff60 sago007 2016-02-21 18:23 62
struct GarbageStruct {
1e5aff60 sago007 2016-02-21 18:23 63
	bool greyGarbage = false;
3d12f4a8 sago007 2016-03-21 18:40 64
	int width = 0;
3d12f4a8 sago007 2016-03-21 18:40 65
	int height = 0;
3d12f4a8 sago007 2016-03-21 18:40 66
	void setGarbage(int w, int h, bool g = false) {
3d12f4a8 sago007 2016-03-21 18:40 67
		greyGarbage = g;
3d12f4a8 sago007 2016-03-21 18:40 68
		width = w;
3d12f4a8 sago007 2016-03-21 18:40 69
		height = h;
3d12f4a8 sago007 2016-03-21 18:40 70
	}
5159dd90 sago007 2016-02-21 15:50 71
};
5159dd90 sago007 2016-02-21 15:50 72
89c4a3a6 sago007 2008-08-29 14:32 73
////////////////////////////////////////////////////////////////////////////////
89c4a3a6 sago007 2008-08-29 14:32 74
//The BloackGame class represents a board, score, time etc. for a single player/
89c4a3a6 sago007 2008-08-29 14:32 75
////////////////////////////////////////////////////////////////////////////////
c53e6443 sago007 2012-04-17 11:04 76
class BlockGame
c53e6443 sago007 2012-04-17 11:04 77
{
89c4a3a6 sago007 2008-08-29 14:32 78
private:
c53e6443 sago007 2012-04-17 11:04 79
	int prevTowerHeight;
c53e6443 sago007 2012-04-17 11:04 80
	bool bGarbageFallLeft;
a1072daf sago007 2016-02-20 12:47 81
	bool singlePuzzle = false;
89c4a3a6 sago007 2008-08-29 14:32 82
63c773dd sago007 2016-01-24 11:47 83
	int nextGarbageNumber;
63c773dd sago007 2016-01-24 11:47 84
	int pushedPixelAt;
63c773dd sago007 2016-01-24 11:47 85
	int nrPushedPixel, nrFellDown;
63c773dd sago007 2016-01-24 11:47 86
	unsigned int nrStops;
c53e6443 sago007 2012-04-17 11:04 87
	bool garbageToBeCleared[7][30];
63c773dd sago007 2016-01-24 11:47 88
	unsigned int lastAImove;
89c4a3a6 sago007 2008-08-29 14:32 89
63c773dd sago007 2016-01-24 11:47 90
	int AI_LineOffset; //how many lines have changed since command
63c773dd sago007 2016-01-24 11:47 91
	int hangTicks;    //How many times have hang been decreased?
c53e6443 sago007 2012-04-17 11:04 92
	//int the two following index 0 may NOT be used (what the fuck did I meen?)
63c773dd sago007 2016-01-24 11:47 93
	int chainSize[NUMBEROFCHAINS]; //Contains the chains
c53e6443 sago007 2012-04-17 11:04 94
	bool chainUsed[NUMBEROFCHAINS];   //True if the chain is used
89c4a3a6 sago007 2008-08-29 14:32 95
63c773dd sago007 2016-01-24 11:47 96
	unsigned int nextRandomNumber;
fde1f2dd sago007 2016-02-21 15:24 97
	int Level; //Only used in stageClear and puzzle (not implemented)
89c4a3a6 sago007 2008-08-29 14:32 98
63c773dd sago007 2016-01-24 11:47 99
	int rand2();
c53e6443 sago007 2012-04-17 11:04 100
	int firstUnusedChain();
89c4a3a6 sago007 2008-08-29 14:32 101
e1290bdf sago007 2010-10-25 19:56 102
//public:
6b1dc7a6 sago007 2010-11-08 21:03 103
protected:
c53e6443 sago007 2012-04-17 11:04 104
	int lastCounter;
63c773dd sago007 2016-01-24 11:47 105
	std::string strHolder;
c53e6443 sago007 2012-04-17 11:04 106
	bool bDraw;
c53e6443 sago007 2012-04-17 11:04 107
	unsigned int ticks;
80b830cd sago007 2012-08-19 17:51 108
	unsigned int gameStartedAt;
80b830cd sago007 2012-08-19 17:51 109
	unsigned int gameEndedAfter;		//How long did the game last?
c53e6443 sago007 2012-04-17 11:04 110
	int linesCleared;
c53e6443 sago007 2012-04-17 11:04 111
	int TowerHeight;
c53e6443 sago007 2012-04-17 11:04 112
	BlockGame *garbageTarget;
63c773dd sago007 2016-01-24 11:47 113
	int board[7][30];
c53e6443 sago007 2012-04-17 11:04 114
	int stop;
c53e6443 sago007 2012-04-17 11:04 115
	int speedLevel;
c53e6443 sago007 2012-04-17 11:04 116
	int pixels;
c53e6443 sago007 2012-04-17 11:04 117
	int MovesLeft;
c53e6443 sago007 2012-04-17 11:04 118
	bool timetrial, stageClear, vsMode, puzzleMode;
c53e6443 sago007 2012-04-17 11:04 119
	int stageClearLimit; //stores number of lines user must clear to win
c53e6443 sago007 2012-04-17 11:04 120
	int combo;
c53e6443 sago007 2012-04-17 11:04 121
	int chain;
c53e6443 sago007 2012-04-17 11:04 122
	int cursorx; //stores cursor position
c53e6443 sago007 2012-04-17 11:04 123
	int cursory; // -||-
c53e6443 sago007 2012-04-17 11:04 124
	double speed, baseSpeed; //factor for speed. Lower value = faster gameplay
63c773dd sago007 2016-01-24 11:47 125
	int score;
c53e6443 sago007 2012-04-17 11:04 126
	bool bGameOver;
c53e6443 sago007 2012-04-17 11:04 127
	bool hasWonTheGame;
c53e6443 sago007 2012-04-17 11:04 128
	int AI_MoveSpeed;   //How often will the computer move? milliseconds
c53e6443 sago007 2012-04-17 11:04 129
	bool AI_Enabled;
50cf6485 sago007 2016-03-21 19:11 130
	bool recordStats = true;
c53e6443 sago007 2012-04-17 11:04 131
63c773dd sago007 2016-01-24 11:47 132
	int handicap;
3d12f4a8 sago007 2016-03-21 18:40 133
	
3d12f4a8 sago007 2016-03-21 18:40 134
	std::vector<GarbageStruct> garbageSendQueue;
c53e6443 sago007 2012-04-17 11:04 135
c53e6443 sago007 2012-04-17 11:04 136
	int AIlineToClear;
c53e6443 sago007 2012-04-17 11:04 137
c53e6443 sago007 2012-04-17 11:04 138
	short AIstatus;   //Status flags:
c53e6443 sago007 2012-04-17 11:04 139
	//0: nothing, 2: clear tower, 3: clear horisontal, 4: clear vertical
c53e6443 sago007 2012-04-17 11:04 140
	//1: make more lines, 5: make 2 lines, 6: make 1 line
6b1dc7a6 sago007 2010-11-08 21:03 141
e1290bdf sago007 2010-10-25 19:56 142
public:
c53e6443 sago007 2012-04-17 11:04 143
8f632c05 sago007 2015-08-22 16:21 144
	std::string name;
c53e6443 sago007 2012-04-17 11:04 145
0f031889 sago007 2012-05-01 19:57 146
public:
c53e6443 sago007 2012-04-17 11:04 147
	BlockGame();
917dac61 sago007 2016-02-21 20:01 148
	virtual ~BlockGame();
c53e6443 sago007 2012-04-17 11:04 149
63c773dd sago007 2016-01-24 11:47 150
	int getAIlevel()  const;
229e212d sago007 2015-08-22 17:14 151
	
313ecd1b sago007 2015-08-22 20:38 152
	virtual void AddText(int x, int y, const std::string& text, int time) const  {}
313ecd1b sago007 2015-08-22 20:38 153
	virtual void AddBall(int x, int y, bool right, int color) const  {}
313ecd1b sago007 2015-08-22 20:38 154
	virtual void AddExplosion(int x, int y) const  {}
313ecd1b sago007 2015-08-22 20:38 155
	virtual void PlayerWonEvent() const  {}
027b5cfd sago007 2015-08-23 14:27 156
	virtual void DrawEvent() const {}
313ecd1b sago007 2015-08-22 20:38 157
	virtual void BlockPopEvent() const  {}
313ecd1b sago007 2015-08-22 20:38 158
	virtual void LongChainDoneEvent() const  {}
313ecd1b sago007 2015-08-22 20:38 159
	virtual void TimeTrialEndEvent() const  {}
313ecd1b sago007 2015-08-22 20:38 160
	virtual void EndlessHighscoreEvent() const  {}
229e212d sago007 2015-08-22 17:14 161
	
027b5cfd sago007 2015-08-23 14:27 162
	int GetScore() const;
027b5cfd sago007 2015-08-23 14:27 163
	int GetHandicap() const;
027b5cfd sago007 2015-08-23 14:27 164
	bool isGameOver() const;
63c773dd sago007 2016-01-24 11:47 165
	int GetGameStartedAt() const;
63c773dd sago007 2016-01-24 11:47 166
	int GetGameEndedAt() const;
027b5cfd sago007 2015-08-23 14:27 167
	bool isTimeTrial() const;
027b5cfd sago007 2015-08-23 14:27 168
	bool isStageClear() const;
027b5cfd sago007 2015-08-23 14:27 169
	bool isVsMode() const;
027b5cfd sago007 2015-08-23 14:27 170
	bool isPuzzleMode() const;
027b5cfd sago007 2015-08-23 14:27 171
	int GetLinesCleared() const;
027b5cfd sago007 2015-08-23 14:27 172
	int GetStageClearLimit() const;
027b5cfd sago007 2015-08-23 14:27 173
	int GetChains() const;
027b5cfd sago007 2015-08-23 14:27 174
	int GetPixels() const;
027b5cfd sago007 2015-08-23 14:27 175
	int GetSpeedLevel() const;
027b5cfd sago007 2015-08-23 14:27 176
	int GetTowerHeight() const;
027b5cfd sago007 2015-08-23 14:27 177
	int GetCursorX() const;
027b5cfd sago007 2015-08-23 14:27 178
	int GetCursorY() const;
c53e6443 sago007 2012-04-17 11:04 179
	void MoveCursorTo(int x, int y);
027b5cfd sago007 2015-08-23 14:27 180
	bool GetIsWinner() const;
3e7b8813 sago007 2016-02-22 19:45 181
    bool isSinglePuzzle() const;
3e7b8813 sago007 2016-02-22 19:45 182
    int getLevel() const;
3e7b8813 sago007 2016-02-22 19:45 183
	bool GetAIenabled() const;
3e7b8813 sago007 2016-02-22 19:45 184
	bool IsNearDeath() const;
5159dd90 sago007 2016-02-21 15:50 185
	void NewGame(const BlockGameStartInfo &s);
0f031889 sago007 2012-05-01 19:57 186
	//Creates garbage using a given wide and height
0f031889 sago007 2012-05-01 19:57 187
	bool CreateGarbage(int wide, int height);
0f031889 sago007 2012-05-01 19:57 188
	//Creates garbage using a given wide and height
0f031889 sago007 2012-05-01 19:57 189
	bool CreateGreyGarbage();
3d12f4a8 sago007 2016-03-21 18:40 190
	void PopSendGarbage(std::vector<GarbageStruct>& poppedData);
0f031889 sago007 2012-05-01 19:57 191
	//prints "Game Over" and ends game
0f031889 sago007 2012-05-01 19:57 192
	void SetGameOver();
0f031889 sago007 2012-05-01 19:57 193
	//Moves the cursor, receaves N,S,E or W as a char an moves as desired
0f031889 sago007 2012-05-01 19:57 194
	void MoveCursor(char way);
0f031889 sago007 2012-05-01 19:57 195
	//switches the two blocks at the cursor position, unless game over
0f031889 sago007 2012-05-01 19:57 196
	void SwitchAtCursor();
0f031889 sago007 2012-05-01 19:57 197
	//Generates a new line and moves the field one block up (restart puzzle mode)
0f031889 sago007 2012-05-01 19:57 198
	void PushLine();
80b830cd sago007 2012-08-19 17:51 199
	void Update(unsigned int newtick);
c53e6443 sago007 2012-04-17 11:04 200
	//Prints "winner" and ends game
c53e6443 sago007 2012-04-17 11:04 201
	void setPlayerWon();
c53e6443 sago007 2012-04-17 11:04 202
	//Prints "draw" and ends the game
c53e6443 sago007 2012-04-17 11:04 203
	void setDraw();
1e5aff60 sago007 2016-02-21 18:23 204
    void setGarbageTarget(BlockGame* garbageTarget);
1e5aff60 sago007 2016-02-21 18:23 205
    BlockGame* getGarbageTarget() const;
e1290bdf sago007 2010-10-25 19:56 206
private:
5159dd90 sago007 2016-02-21 15:50 207
	void NewGame(unsigned int ticks);
c53e6443 sago007 2012-04-17 11:04 208
	//Test if LineNr is an empty line, returns false otherwise.
ca486238 sago007 2015-08-23 15:12 209
	bool LineEmpty(int lineNr) const;
c53e6443 sago007 2012-04-17 11:04 210
	//Test if the entire board is empty (used for Puzzles)
ca486238 sago007 2015-08-23 15:12 211
	bool BoardEmpty() const;
c53e6443 sago007 2012-04-17 11:04 212
	//Anything that the user can't move? In that case Game Over cannot occur
ca486238 sago007 2015-08-23 15:12 213
	bool hasStaticContent() const;
c53e6443 sago007 2012-04-17 11:04 214
	void putStartBlocks();
917dac61 sago007 2016-02-21 20:01 215
	void putStartBlocks(int n);
c53e6443 sago007 2012-04-17 11:04 216
	//decreases hang for all hanging blocks and wait for waiting blocks
c53e6443 sago007 2012-04-17 11:04 217
	void ReduceStuff();
3e7b8813 sago007 2016-02-22 19:45 218
	void setGameSpeed(int globalSpeedLevel);
3e7b8813 sago007 2016-02-22 19:45 219
	void setHandicap(int globalHandicap);
c53e6443 sago007 2012-04-17 11:04 220
	//Clears garbage, must take one the lower left corner!
c53e6443 sago007 2012-04-17 11:04 221
	int GarbageClearer(int x, int y, int number, bool aLineToClear, int chain);
c53e6443 sago007 2012-04-17 11:04 222
	//Marks garbage that must be cleared
c53e6443 sago007 2012-04-17 11:04 223
	int GarbageMarker(int x, int y);
c53e6443 sago007 2012-04-17 11:04 224
	int FirstGarbageMarker(int x, int y);
c53e6443 sago007 2012-04-17 11:04 225
	//Clear Blocks if 3 or more is alligned (naive implemented)
c53e6443 sago007 2012-04-17 11:04 226
	void ClearBlocks();
c53e6443 sago007 2012-04-17 11:04 227
	//Moves all peaces a spot down if possible
c53e6443 sago007 2012-04-17 11:04 228
	int FallBlock(int x, int y, int number);
c53e6443 sago007 2012-04-17 11:04 229
	//Makes all Garbage fall one spot
c53e6443 sago007 2012-04-17 11:04 230
	void GarbageFall();
c53e6443 sago007 2012-04-17 11:04 231
	//Makes the blocks fall (it doesn't test time, this must be done before hand)
c53e6443 sago007 2012-04-17 11:04 232
	void FallDown();
c53e6443 sago007 2012-04-17 11:04 233
	//Pushes a single pixel, so it appears to scrool
c53e6443 sago007 2012-04-17 11:04 234
	void PushPixels();
c53e6443 sago007 2012-04-17 11:04 235
	//See how high the tower is, saved in integer TowerHeight
c53e6443 sago007 2012-04-17 11:04 236
	void FindTowerHeight();
89c4a3a6 sago007 2008-08-29 14:32 237
///////////////////////////////////////////////////////////////////////////
89c4a3a6 sago007 2008-08-29 14:32 238
/////////////////////////// AI starts here! ///////////////////////////////
89c4a3a6 sago007 2008-08-29 14:32 239
///////////////////////////////////////////////////////////////////////////
c53e6443 sago007 2012-04-17 11:04 240
	//First the helpet functions:
c53e6443 sago007 2012-04-17 11:04 241
	int nrOfType(int line, int type);
c53e6443 sago007 2012-04-17 11:04 242
	int AIcolorToClear;
c53e6443 sago007 2012-04-17 11:04 243
	//See if a combo can be made in this line
c53e6443 sago007 2012-04-17 11:04 244
	int horiInLine(int line);
c53e6443 sago007 2012-04-17 11:04 245
	bool horiClearPossible();
c53e6443 sago007 2012-04-17 11:04 246
	//the Line Has Unmoveable Objects witch might stall the AI
c53e6443 sago007 2012-04-17 11:04 247
	bool lineHasGarbage(int line);
c53e6443 sago007 2012-04-17 11:04 248
	//Types 0..6 in line
c53e6443 sago007 2012-04-17 11:04 249
	int nrOfRealTypes(int line);
c53e6443 sago007 2012-04-17 11:04 250
	//See if there is a tower
c53e6443 sago007 2012-04-17 11:04 251
	bool ThereIsATower();
c53e6443 sago007 2012-04-17 11:04 252
	double firstInLine1(int line);
c53e6443 sago007 2012-04-17 11:04 253
	//returns the first coordinate of the block of type
c53e6443 sago007 2012-04-17 11:04 254
	double firstInLine(int line, int type);
c53e6443 sago007 2012-04-17 11:04 255
	//There in the line shall we move
c53e6443 sago007 2012-04-17 11:04 256
	int closestTo(int line, int place);
c53e6443 sago007 2012-04-17 11:04 257
	//The AI will remove a tower
c53e6443 sago007 2012-04-17 11:04 258
	void AI_ClearTower();
c53e6443 sago007 2012-04-17 11:04 259
	//The AI will try to clear block horisontally
c53e6443 sago007 2012-04-17 11:04 260
	void AI_ClearHori();
c53e6443 sago007 2012-04-17 11:04 261
	//Test if vertical clear is possible
c53e6443 sago007 2012-04-17 11:04 262
	bool veriClearPossible();
c53e6443 sago007 2012-04-17 11:04 263
	//There in the line shall we move
c53e6443 sago007 2012-04-17 11:04 264
	int closestTo(int line, int type, int place);
c53e6443 sago007 2012-04-17 11:04 265
	//The AI will try to clear blocks vertically
c53e6443 sago007 2012-04-17 11:04 266
	void AI_ClearVertical();
c53e6443 sago007 2012-04-17 11:04 267
	bool firstLineCreated;
c53e6443 sago007 2012-04-17 11:04 268
	void AI_Move();
89c4a3a6 sago007 2008-08-29 14:32 269
//////////////////////////////////////////////////////////////////////////
89c4a3a6 sago007 2008-08-29 14:32 270
///////////////////////////// AI ends here! //////////////////////////////
a1072daf sago007 2016-02-20 12:47 271
////////
a1072daf sago007 2016-02-20 12:47 272
//////////////////////////////////////////////////////////////////
6d6b2788 sago007 2016-02-21 18:51 273
	//Set the move speed of the AI based on the aiLevel parameter
6d6b2788 sago007 2016-02-21 18:51 274
	//Also enables AI
6d6b2788 sago007 2016-02-21 18:51 275
	void setAIlevel(int aiLevel);
79d3c1d3 sago007 2012-05-05 15:54 276
	void PushLineInternal();
c53e6443 sago007 2012-04-17 11:04 277
	//Updates evrything, if not called nothing happends
c53e6443 sago007 2012-04-17 11:04 278
	void Update();
80b830cd sago007 2012-08-19 17:51 279
	void UpdateInternal(unsigned int newtick);
17916a2e sago007 2010-11-07 11:26 280
};
fde1f2dd sago007 2016-02-21 15:24 281
c1785ec5 sago007 2016-02-21 16:07 282
//Play the next level
c1785ec5 sago007 2016-02-21 16:07 283
void nextLevel(BlockGame& g, unsigned int ticks);
fde1f2dd sago007 2016-02-21 15:24 284
//Replay the current level
fde1f2dd sago007 2016-02-21 15:24 285
void retryLevel(BlockGame& g, unsigned int ticks);
17916a2e sago007 2010-11-07 11:26 286
17916a2e sago007 2010-11-07 11:26 287
#endif
1970-01-01 00:00 288