-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLevel.h
More file actions
45 lines (35 loc) · 968 Bytes
/
Level.h
File metadata and controls
45 lines (35 loc) · 968 Bytes
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
#ifndef LEVEL_H_
#define LEVEL_H_
#include <map>
#include <memory>
#include <string>
#include <fstream>
class AbstractBlock;
class Level {
protected:
std::string filename;
int getRandom() const;
char sampleType() const;
char getTypeFromFile() const;
int block_count;
bool is_random;
public:
std::unique_ptr<std::ifstream> block_file;
std::map<char, int> curr_weights;
int weight_sum = 0;
// very temp
Level();
Level(std::map<char, int> weights);
void updateBlockCount(bool);
std::unique_ptr<AbstractBlock> createBlock(char) const;
virtual std::unique_ptr<AbstractBlock> getNextBlock() const;
virtual void move(AbstractBlock*, std::string);
virtual void heavyMove(AbstractBlock*, std::string);
virtual std::unique_ptr<Level> getNextLevel() const;
virtual std::unique_ptr<Level> getPrevLevel() const;
virtual int getLevel() const;
virtual void setRandom(bool);
void setFile(std::unique_ptr<std::ifstream>);
virtual ~Level();
};
#endif