My Project
core
osl
bits
pieceTable.h
Go to the documentation of this file.
1
/* pieceTable.h
2
*/
3
#ifndef OSL_PIECE_TABLE_H
4
#define OSL_PIECE_TABLE_H
5
6
#include "
osl/basic_type.h
"
7
#include "
osl/container.h
"
8
namespace
osl
9
{
10
class
PieceTable
11
{
12
private
:
13
CArray<Ptype, Piece::SIZE>
ptypes
;
14
template
<Ptype T>
15
void
initPtype
();
16
public
:
17
PieceTable
();
18
Ptype
getPtypeOf
(
int
num)
const
{
19
assert(
validNumber
(num));
20
return
ptypes
[num];
21
}
22
static
bool
validNumber
(
int
num) {
23
return
0<=num && num<=39;
24
}
25
};
26
27
extern
const
PieceTable
Piece_Table
;
28
}
29
30
#endif
/* OSL_PIECE_TABLE_H */
31
// ;;; Local Variables:
32
// ;;; mode:c++
33
// ;;; c-basic-offset:2
34
// ;;; End:
basic_type.h
osl::CArray
Definition
container.h:20
osl::PieceTable
Definition
pieceTable.h:11
osl::PieceTable::PieceTable
PieceTable()
Definition
pieceTable.cc:15
osl::PieceTable::validNumber
static bool validNumber(int num)
Definition
pieceTable.h:22
osl::PieceTable::ptypes
CArray< Ptype, Piece::SIZE > ptypes
Definition
pieceTable.h:13
osl::PieceTable::initPtype
void initPtype()
Definition
pieceTable.cc:7
osl::PieceTable::getPtypeOf
Ptype getPtypeOf(int num) const
Definition
pieceTable.h:18
container.h
osl
Definition
additionalEffect.h:6
osl::Ptype
Ptype
駒の種類を4ビットでコード化する
Definition
basic_type.h:84
osl::Piece_Table
const PieceTable Piece_Table
Definition
tables.cc:94
Generated by
1.9.8