-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBoard.h
59 lines (53 loc) · 1.19 KB
/
Board.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
#pragma once
#include <SFML/Graphics.hpp>
#include <string>
#include "Game.h"
using namespace std;
class Tile;
class Button;
class Dial;
class TossButton;
class Board
{
int centerX;
int centerY;
Dial* dial;
TossButton* tossButton;
Button* warp;
Button* rematch;
Button* music;
Tile* tiles[72];
sf::Texture diceTexture;
sf::Sprite dice;
sf::Texture bgTexture;
sf::Sprite background;
public:
const static int TILES_AMOUNT = 72;
const static int BASE_FIRST_ID = 100;
const static int BASE_SIZE = 4;
const static int LAST_TILE = 40;
const static int TARGET_FIRST_ID = 50;
const static int TARGET_LAST_ID = 53;
Board() = delete;
Board(sf::RenderWindow* window);
~Board();
void drawBoard(sf::RenderWindow* window);
void setDiceTexture(string texturePath);
int getCenterX() const;
int getCenterY() const;
Tile* getTileById(int id) const;
Button* getWarp() const;
Button* getRematch() const;
Button* getSound() const;
Dial* getDial() const;
TossButton* getTossButton() const;
Tile** getTiles();
private:
void setCenter(sf::RenderWindow* window);
void drawLogo(sf::RenderWindow* window);
void initBackground();
void initTiles();
void initButtons();
void initBoard();
void setIds();
};