1 // Brain Party
2 // Copyright (C) 2010 Paul Hudson (http://www.tuxradar.com/brainparty)
3 
4 // Brain Party is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU General Public License
6 // as published by the Free Software Foundation; either version 3
7 // of the License, or (at your option) any later version.
8 
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 // GNU General Public License for more details.
13 
14 // You should have received a copy of the GNU General Public License
15 // along with this program; if not, write to the Free Software
16 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
17 
18 #ifndef __NUMBERSNAKE_H__
19 #define __NUMBERSNAKE_H__
20 
21 #include "Minigame.h"
22 
23 class BPMiniGame_NumberSnake : public BPMiniGame {
24 public:
25 	BPMiniGame_NumberSnake(BPGame* game);
26 	~BPMiniGame_NumberSnake();
27 	void OnMouseUp();
28 	void OnMouseMove();
29 	void OnMouseDown();
30 	void Start();
31 	int GetWeight();
32 	void Render();
33 	void Tick();
34 	void SubmitAnswer(int answer);
35 	void LevelUp();
36 	void SetMarathon();
37 protected:
38 	Texture* sfcBackground;
39 	Texture* sfcBlack;
40 	int CurrentLevel;
41 	MiniGameStates GameState;
42 
43 	BPList<const char*> NumStrings;
44 
45 	int LastStateChange;
46 	int LastQuestionChange;
47 	int NumCorrect;
48 	float Fader;
49 
50 	SpriteFont** sfcQuestionParts;
51 	int QuestionLength;
52 	int Answer;
53 
54 	int QuestionPos;
55 	int QuestionSpeed;
56 
57 	static const int HalfHeight;
58 
59 	int TimeStarted;
60 };
61 
62 #endif
63