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