rsmc
Loading...
Searching...
No Matches
core.h File Reference

Types and constants for rsmc. More...

#include "version.h"
#include <assert.h>
#include <stdbool.h>
#include <stdint.h>

Go to the source code of this file.

Data Structures

struct  RsmcPlayersScore
 Stores score fot both players. More...
 
struct  RsmcGameState
 Stores score for both players and game status. More...
 
struct  RsmcBoard
 Stores board as two RsmcBitMap for each player pieces. More...
 

Typedefs

typedef uint32_t RsmcVersion
 
typedef uint8_t RsmcPlayer
 Player's color.
 
typedef uint8_t RsmcGameStatus
 Game status (continue, draw, black win, white win).
 
typedef uint8_t RsmcPlayerScore
 
typedef uint64_t RsmcBitMap
 
typedef uint64_t RsmcBitMask
 

Enumerations

enum  {
  RsmcBoardSize = 8 , RsmcBoardArea = RsmcBoardSize * RsmcBoardSize , RsmcMinCoord = 0 , RsmcMaxCoord = RsmcBoardSize - 1 ,
  RsmcMinCellIndex = 0 , RsmcMaxCellIndex = RsmcBoardArea - 1 , RsmcMaxValidMoves = 34
}
 
enum  { RsmcPlayerBlack = 0 , RsmcPlayerWhite = 1 , RsmcPlayerCount = 2 }
 
enum  {
  RsmcGameStatusContinue = 0 , RsmcGameStatusDraw = 1 , RsmcGameStatusBlackWin = 2 , RsmcGameStatusWhiteWin = 3 ,
  RsmcGameStatusCount = 4
}
 

Detailed Description

Types and constants for rsmc.

Typedef Documentation

◆ RsmcBitMap

typedef uint64_t RsmcBitMap

◆ RsmcBitMask

typedef uint64_t RsmcBitMask

◆ RsmcGameStatus

typedef uint8_t RsmcGameStatus

Game status (continue, draw, black win, white win).

◆ RsmcPlayer

typedef uint8_t RsmcPlayer

Player's color.

◆ RsmcPlayerScore

typedef uint8_t RsmcPlayerScore

Stores score for one player.

◆ RsmcVersion

typedef uint32_t RsmcVersion

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
RsmcBoardSize 

Size of one side of the board.

RsmcBoardArea 

Count of cells on the board.

RsmcMinCoord 

Minimal possible value for index on the 2-dimensional board.

RsmcMaxCoord 

Maximal possible value for index on the 2-dimensional board.

RsmcMinCellIndex 

Minimal possible value for index on the 1-dimensional board.

RsmcMaxCellIndex 

Maximal possible value for index on the 1-dimensional board.

RsmcMaxValidMoves 

Maximal possible count of valid moves. Proven by Takizawa, Hiroki in 2023.

◆ anonymous enum

anonymous enum
Enumerator
RsmcPlayerBlack 
RsmcPlayerWhite 
RsmcPlayerCount 

◆ anonymous enum

anonymous enum
Enumerator
RsmcGameStatusContinue 
RsmcGameStatusDraw 
RsmcGameStatusBlackWin 
RsmcGameStatusWhiteWin 
RsmcGameStatusCount