Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <SFML/Graphics.hpp>
- #include <vector>
- #include <algorithm>
- using namespace std;
- class Cell
- {
- public:
- bool RightWall, BottomWall;
- int Value;
- Cell();
- //~Cell();
- protected:
- private:
- };
- Cell::Cell()
- {
- RightWall = 1;
- BottomWall = 1;
- Value = 0;
- }
- void step(vector<int>& New, vector<int>& Old)
- {
- }
- int main()
- {
- vector<Cell> MazeData;
- vector<Cell> New;
- vector<Cell> Old;
- int SetNum = 2, MazeX, MazeY;
- cout << "MazeX, MazeY: ";
- cin >> MazeX >> MazeY;
- MazeData.resize(MazeX * MazeY);
- New.resize(MazeX);
- Old.resize(MazeX);
- New[0].Value = 1;
- for(int i = 1; i < MazeX; i++)
- if(sf::Randomizer::Random(0,1))
- {
- New[i].Value = New[i-1].Value;
- New[i-1].RightWall = 0;
- }
- else
- New[i].Value = SetNum++;
- for(int i = 0; i < MazeX; i++)
- cout << New[i].Value;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement