Minesweeper / src / Board.h
Board.h
Raw
#include "TextureManager.h"
#include "Tiles.h"
#include "Random.h"
#include <iostream>
#include <set>
#include <fstream>
#include<sstream>
using namespace std;


#pragma once

class Board {
    sf::Sprite test_1;
    sf::Sprite test_2;
    sf::Sprite test_3;
    sf::Sprite debug;
    sf::Sprite face_happy;
    sf::Sprite face_win;
    sf::Sprite face_lose;
    sf::Sprite tile_hidden;
    sf::Sprite digits;

    int mineCount;
    bool gameLost;
    bool gameWon;
    bool gameInProgress;

public:
    Board();
    void getGameLost(bool val);

    void setMainBoard(int width, int height,int w, int h, int mine_ct, vector<Tiles> &tiles, Tiles &tile);
    void setTests(string filename, sf::RenderWindow &window, vector<Tiles>& tiles);
    void SetPositionTest1Button(sf::RenderWindow &window);
    void SetDigits(sf::RenderWindow &window);
    void MinesRemaining(sf::RenderWindow &window, vector<Tiles> &tiles, Board &board);
    void DigitSubtract(vector<Tiles> &tiles,Board& board, int i, int j, int height);

    int getMineCount();
    bool getGameInProgress();
    void Draw(sf::RenderWindow &window);
    void setDebugOn(sf::RenderWindow &window, int width, int height, vector<Tiles> &tiles, Tiles &tile);
    void GameOverCheck(int width,int height, vector<Tiles> &tiles, Tiles tile);


    sf::FloatRect GetBoundstest_1();
    sf::FloatRect GetBoundstest_2();
    sf::FloatRect GetBoundstest_3();
    sf::FloatRect GetBoundsdebug();
    sf::FloatRect GetBoundsSmiley();


};