-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSnong.h
70 lines (55 loc) · 1.49 KB
/
Snong.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
// Programming 2D Games
// Copyright (c) 2011 by:
// Charles Kelly
// Chapter 4 spacewar.h v1.0
#ifndef _SNONG_H // prevent multiple definitions if this
#define _SNONG_H // ..file is included in more than one place
#define WIN32_LEAN_AND_MEAN
#include "game.h"
#include "Snake.h"
#include "Ball.h"
#include "textDX.h"
//=============================================================================
// Create game class
//=============================================================================
class Snong : public Game
{
private:
bool firstRound;
bool victoryScreen;
enum Players{none, red, green} winner, lastPoint;
// variables
Snake Player1, Player2;
Entity **P1Head;
Entity **P2Head;
UINT Player1Score, Player2Score;
Ball ball; // ball entity
Image backgroundImage;
Image borderImage1;
Image borderImage2;
TextureManager ballTexture;
TextureManager backgroundTexture;
TextureManager borderRedTexture;
TextureManager borderGreenTexture;
float timeSinceLastMove;
float timeSincePointDisplayed;
bool gamePaused;
TextDX *spaceBarMessage;
TextDX *scoreText;
TextDX *victoryText;
TextDX *roundText;
public:
// Constructor
Snong();
// Destructor
virtual ~Snong();
// Initialize the game
void initialize(HWND hwnd);
void update(); // must override pure virtual from Game
void ai(); // "
void collisions(); // "
void render(); // "
void releaseAll();
void resetAll();
};
#endif