centering3x3.h
Go to the documentation of this file.
/* centering3x3.h
*/
#ifndef OSL_CENTERING3X3_H
#define OSL_CENTERING3X3_H
#include "osl/container.h"
namespace osl
{
struct Centering3x3
{
struct Table
{
CArray<Square,Square::SIZE> centers;
void init();
};
static const Square adjustCenterNaive(Square);
static Table table;
static const Square adjustCenter(Square src)
{
return table.centers[src.index()];
}
};
} // namespace osl
#endif /* OSL_CENTERING3X3_H */
// ;;; Local Variables:
// ;;; mode:c++
// ;;; c-basic-offset:2
// ;;; coding:utf-8
// ;;; End:
osl::CArray
Definition container.h:20
osl::Square
Definition basic_type.h:532
osl::Square::index
unsigned int index() const
Definition basic_type.h:572
container.h
osl
Definition additionalEffect.h:6
osl::Centering3x3::Table
Definition centering3x3.h:16
osl::Centering3x3::Table::init
void init()
Definition centering3x3.cc:11
osl::Centering3x3::Table::centers
CArray< Square, Square::SIZE > centers
Definition centering3x3.h:17
osl::Centering3x3
3x3が盤上におさまるように中心を調整
Definition centering3x3.h:14
osl::Centering3x3::adjustCenter
static const Square adjustCenter(Square src)
Definition centering3x3.h:22
osl::Centering3x3::table
static Table table
Definition centering3x3.h:21
osl::Centering3x3::adjustCenterNaive
static const Square adjustCenterNaive(Square)
Definition centering3x3.cc:37