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
8namespace osl
9{
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
3x3が盤上におさまるように中心を調整
static const Square adjustCenter(Square src)
static Table table
static const Square adjustCenterNaive(Square)