ETrobocon2017 - 片山研究所モデルベース開発推進事業部
TargetFigure.h
[詳解]
1 #ifndef _INC_TARGET_FIGURE
2 #define _INC_TARGET_FIGURE
3 
4 #include "BlockColor.h"
5 
6 #include <array>
7 
8 using namespace std;
9 
11 {
12 private:
13  int initPositions[5];
14  const int leftSquare[5] = {0, 1, 5, 2, 10};
15  const int pentagon[5] = {8, 14, 13, 9, 6};
16  const int rightSquare[5] = {0, 7, 3, 4, 11};
17  int targets[5];
18 
19 public:
20  TargetFigure();
21  ~TargetFigure();
22  void set(int positions[5]);
23  void evaluate();
24  int getTargetNum(BlockColor color);
25  int getNumberInLeftSquare(int[]);
26 };
27 
28 #endif //_INC_TARGET_FIGURE
BlockColor
Definition: BlockColor.h:5