43 lines
942 B
C++
43 lines
942 B
C++
#pragma once
|
|
#define LEADERBOARD_FILE "tablica_wynikow.csv"
|
|
#include "Board.hpp"
|
|
#include <thread>
|
|
#include <SFML/Graphics.hpp>
|
|
#include <SFML/Audio.hpp>
|
|
#include <SFML/System/Sleep.hpp>
|
|
#include <SFML/System/Time.hpp>
|
|
|
|
class Game {
|
|
|
|
private:
|
|
|
|
std::vector<std::string> leaderboardName;
|
|
std::vector<unsigned int> leaderboardWins;
|
|
sf::Music soundBuffer1;
|
|
Board board;
|
|
|
|
// Metody
|
|
void initVariables();
|
|
void playStartTune();
|
|
|
|
public:
|
|
|
|
// Aby przekazać je do Engine
|
|
std::string leaderboardLocation;
|
|
|
|
// Konstruktor, destruktor
|
|
Game();
|
|
~Game();
|
|
|
|
// Akcesor
|
|
const bool running() const;
|
|
|
|
// Metody klasy
|
|
void printGameWelcomeText() const;
|
|
void readLeaderboards(std::string leaderboardLocation);
|
|
void dumpLeaderboards(std::string leaderboardLocation = LEADERBOARD_FILE, bool verbose = true) const;
|
|
unsigned int updateLeaderboards(std::string winnerNickname);
|
|
void printLeaderboards() const;
|
|
void run();
|
|
|
|
}; |