ETrobocon2017 - 片山研究所モデルベース開発推進事業部
BoardAnalyzer.cpp
[詳解]
1 #include "BoardAnalyzer.h"
2 
4 {
5 
6 }
7 
9 {
10 
11 }
12 
13 // ubN̔zu̓void BoardAnalyzer::set(int *initPositions) { positions = initPositions; } // lp`̃ubҐ int BoardAnalyzer::getInLeftSquareCount() { int leftSquareCount = 0; // ubN̏ʒuōlp`ɂ̂JEg for(int i=0; i<5; i++) { for(int j=0; j<5; j++) { if(positions[i] == leftSquare[j]) { leftSquareCount++; } } } return leftSquareCount; } bool BoardAnalyzer::hasExchangePatternOnLeftSquare() { // for(int i=0; i<5; i++) { for(int j=0; j<5; j++) { if() { } } } return ; }
14 void BoardAnalyzer::set(int *initPositions)
15 {
16  positions = initPositions;
17 }
18 
19 // lp`̃ubҐ
21 {
22  int leftSquareCount = 0;
23 
24  // ubN̏ʒuōlp`ɂ̂JEg
25  for(int i=0; i<5; i++)
26  {
27  for(int j=0; j<5; j++)
28  {
29  if(positions[i] == leftSquare[j])
30  {
31  leftSquareCount++;
32  }
33  }
34  }
35 
36  return leftSquareCount;
37 }
38 
39 bool BoardAnalyzer::hasExchangePatternOnLeftSquare()
40 {
41  //
42  for(int i=0; i<5; i++)
43  {
44  for(int j=0; j<5; j++)
45  {
46  if()
47  {
48 
49  }
50  }
51  }
52  return ;
53 }
54 
void set(int *initPositions)
int getInLeftSquareCount()