-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDirections.h
60 lines (46 loc) · 2.5 KB
/
Directions.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#pragma once
#include <vector>
#include <string>
class Directions
{
private:
std::vector<std::pair<int, int> > xy_modifiers;
std::vector<std::string> move_directions;
std::vector<std::pair<std::string, std::pair<int, int> > > horizontal_offsets_with_dir;
std::vector<std::pair<int, int> > horizontal_pair_offsets;
std::vector<std::pair<std::string, std::pair<int, int> > > vertical_offsets_with_dir;
std::vector<std::pair<int, int> > vertical_pair_offsets;
std::vector<std::pair<std::string, std::pair<int, int> > > diagonal_offsets_with_dir;
std::vector<std::pair<int, int> > diagonal_pair_offsets;
std::vector<std::pair<std::string, std::pair<int, int> > > perp_offsets_with_dir;
std::vector<std::pair<int, int> > perp_pair_offsets;
std::vector<std::string> setMoveDirections();
void setXYModifiers();
void setDirXYPairs();
void setPairPatterns();
public:
std::vector<std::pair<std::string, std::pair<int, int> > > dir_xy_pairs;
Directions();
~Directions();
std::vector<std::string> getAllDirections(void);
std::vector<std::pair<std::string, std::pair<int, int> > > getDirectionPairs();
std::vector<std::pair<int, int> > getXYOffsets();
std::vector<std::pair<std::string, std::pair<int, int> > > getHorizontalPairOffsetsWithDir();
std::vector<std::pair<int, int> > getHorizontalPairOffsets();
std::vector<std::pair<std::string, std::pair<int, int> > > getVerticalPairOffsetsWithDir();
std::vector<std::pair<int, int> > getVerticalPairOffsets();
std::vector<std::pair<std::string, std::pair<int, int> > > getDiagonalPairOffsetsWithDir();
std::vector<std::pair<int, int> > getDiagonalPairOffsets();
std::vector<std::pair<std::string, std::pair<int, int> > > getPerpPairOffsetsWithDir();
std::vector<std::pair<int, int> > getPerpPairOffsets();
std::pair<std::string, std::pair<int, int> > getPairComboForString(std::string);
std::pair<std::string, std::pair<int, int> > getOppositeDirectionPair(std::pair<std::string, std::pair<int, int> >);
std::pair<std::string, std::pair<int, int> > getRandomDirectionPair();
std::pair<std::string, std::pair<int, int> > getRandomVerticalDirectionPair();
std::pair<std::string, std::pair<int, int> > getRandomHorizontalDirectionPair();
std::pair<std::string, std::pair<int, int> > getRandomDiagonalDirectionPair();
std::pair<std::string, std::pair<int, int> > getRandomPerpDirectionPair();
std::string getDirForPair(std::pair<int, int> presentPair, std::pair<int, int> movePair);
std::string getDirForOffset(std::pair<int, int> offsetPair);
void printDirXYPairs();
};