-
Notifications
You must be signed in to change notification settings - Fork 0
/
render_handler.h
42 lines (36 loc) · 1.22 KB
/
render_handler.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
#ifndef RENDER_HANDLER_H
#define RENDER_HANDLER_H
#include <SFML/Graphics.hpp>
#include <string>
#include "SFMLFactory.h"
#include "game_screen.h"
#include "render_api.h"
class Result {
public:
Result(string s, bool e) {
nickname = s;
exit = e;
}
string nickname;
bool exit;
};
class RenderHandler {
public:
static Result handleNickEvent(sf::RenderWindow*, sf::Text*);
static std::tuple<std::string, int, int, int> handleShipPlacement(int msgtype, int type, int nr);
static void handleBoardGame(sf::RectangleShape game_background, sf::Text twojaplanszatekst,
sf::Text planszaprzeciwnikatekst, sf::Text komunikat,
game_screen game_screen,
Plansza plansza1, Plansza plansza2,
Plansza plansza2_1, Plansza plansza2_2,
sf::RenderWindow* Window, int typ,
unsigned int& oddane_strzaly_1,
unsigned int& oddane_strzaly_2,
unsigned int& trafienia_1,
unsigned int& trafienia_2, render_api* renderer);
static void handleBoardSetup(sf::RectangleShape game_background, sf::Text twojaplanszatekst,
sf::Text planszaprzeciwnikatekst, game_screen game_screen, Plansza plansza1, Plansza plansza2, sf::RenderWindow* Window, render_api* renderer);
private:
static int czy_wygrana(Plansza plansza);
};
#endif