6#ifndef OFFSETOF_CONSTEXPR
7#define OFFSETOF_CONSTEXPR(type, member) \
8 ((size_t)(&((type*)0)->member) - (size_t)0)
40_Static_assert(
sizeof(
XOGame) ==
sizeof(
XOGameMutable),
"XOGame and XOGameMutable must have the same size");
41_Static_assert(_Alignof(
XOGame) == _Alignof(
XOGameMutable),
"XOGame and XOGameMutable must have the same alignment");
53_Static_assert(
sizeof(((
XOGame*)0)->make_move) ==
sizeof(((
XOGameMutable*)0)->make_move),
"Field 'make_move' must have the same size in both structures");
54_Static_assert(
sizeof(((
XOGame*)0)->destruct) ==
sizeof(((
XOGameMutable*)0)->destruct),
"Field 'destruct' must have the same size in both structures");
55_Static_assert(
sizeof(((
XOGame*)0)->board) ==
sizeof(((
XOGameMutable*)0)->board),
"Field 'board' must have the same size in both structures");
56_Static_assert(
sizeof(((
XOGame*)0)->log) ==
sizeof(((
XOGameMutable*)0)->log),
"Field 'log' must have the same size in both structures");
57_Static_assert(
sizeof(((
XOGame*)0)->winners) ==
sizeof(((
XOGameMutable*)0)->winners),
"Field 'winners' must have the same size in both structures");
58_Static_assert(
sizeof(((
XOGame*)0)->turn) ==
sizeof(((
XOGameMutable*)0)->turn),
"Field 'turn' must have the same size in both structures");
59_Static_assert(
sizeof(((
XOGame*)0)->padding) ==
sizeof(((
XOGameMutable*)0)->padding),
"Field 'padding' must have the same size in both structures");
@ XO_BOARDX
Размер поля по оси X.
Definition XOGame.h:69
@ XO_BOARDY
Размер поля по оси Y.
Definition XOGame.h:71
XORetCode
Перечисление задающее коды возвраща для XOGame::make_move.
Definition XOGame.h:90
XOPlayerSide
Перечисление задающее типы владения
Definition XOGame.h:78
XORetCode xogame_make_move(XOGame *_Game, int _CellX, int _CellY, XOPlayerSide _PlayerSide)
#define OFFSETOF_CONSTEXPR(type, member)
Definition _XOGame.h:7
void xogame_destruct(XOGame *_Game)
XORetCode xogame_make_move_original_fast(XOGame *_Game, int _CellX, int _CellY, XOPlayerSide _PlayerSide)
Изменяемый клон XOGame.
Definition _XOGame.h:16
void(* destruct)(XOGame *_Game)
Definition _XOGame.h:21
uint8_t turn
Текущий ход начиная с 0.
Definition _XOGame.h:29
uint8_t padding[2]
Выравнивающие байты - { 0 }.
Definition _XOGame.h:31
size_t id
Идентификатор игры
Definition _XOGame.h:18
XOCell winners[XO_BOARDX]
Выигравшие клетки. По-умолчанию - { 0 }.
Definition _XOGame.h:27
XOCell board[XO_BOARDX][XO_BOARDY]
Игровое поле
Definition _XOGame.h:23
XORetCode(* make_move)(XOGame *_Game, int _CellX, int _CellY, XOPlayerSide _PlayerSide)
Сделать ход.
Definition _XOGame.h:20
XOCell log[XO_BOARDX *XO_BOARDY]
Лог ходов
Definition _XOGame.h:25