My Project
centering3x3.h
Go to the documentation of this file.
1 /* centering3x3.h
2  */
3 #ifndef OSL_CENTERING3X3_H
4 #define OSL_CENTERING3X3_H
5 
6 #include "osl/container.h"
7 
8 namespace osl
9 {
13  struct Centering3x3
14  {
15  struct Table
16  {
18  void init();
19  };
20  static const Square adjustCenterNaive(Square);
21  static Table table;
22  static const Square adjustCenter(Square src)
23  {
24  return table.centers[src.index()];
25  }
26  };
27 
28 } // namespace osl
29 
30 #endif /* OSL_CENTERING3X3_H */
31 // ;;; Local Variables:
32 // ;;; mode:c++
33 // ;;; c-basic-offset:2
34 // ;;; coding:utf-8
35 // ;;; End:
unsigned int index() const
Definition: basic_type.h:572
CArray< Square, Square::SIZE > centers
Definition: centering3x3.h:17
3x3が盤上におさまるように中心を調整
Definition: centering3x3.h:14
static const Square adjustCenter(Square src)
Definition: centering3x3.h:22
static Table table
Definition: centering3x3.h:21
static const Square adjustCenterNaive(Square)
Definition: centering3x3.cc:37