All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Functions
c/facade.cc File Reference
#include "osl/c/facade.h"
#include "osl/checkmate/dualDfpn.h"
#include "osl/game_playing/alphaBetaPlayer.h"
#include "osl/game_playing/gameState.h"
#include "osl/game_playing/usiState.h"
#include "osl/game_playing/usiResponse.h"
#include "osl/search/simpleHashTable.h"
#include "osl/search/simpleHashRecord.h"
#include "osl/record/csaString.h"
#include "osl/record/csa.h"
#include "osl/record/kanjiPrint.h"
#include "osl/record/usi.h"
#include <boost/make_shared.hpp>
#include <string>
#include <cstdio>
#include <cstring>
Include dependency graph for c/facade.cc:

Go to the source code of this file.

Functions

void osl_init ()
 
int checkmate_attack (const char *state_str, int &limit, char *move)
 
int checkmate_escape (const char *state_str, int limit)
 
int search (const char *state_str, int seconds, int verbose, char *move)
 
int usiMovesToKanji (const char *command, char *out, int out_size)
 Converts moves in a USI format string to a Kanji representation. More...
 
int usiMovesToPositionString (const char *moves_str, char *out, int out_size)
 Generates a Kanji position spcified by moves in a USI format string. More...
 

Function Documentation

int checkmate_attack ( const char *  state_str,
int &  limit,
char *  move 
)
int checkmate_escape ( const char *  state_str,
int  limit 
)
void osl_init ( )

Definition at line 21 of file c/facade.cc.

References osl::OslConfig::setUp().

int search ( const char *  state_str,
int  seconds,
int  verbose,
char *  move 
)
int usiMovesToKanji ( const char *  command,
char *  out,
int  out_size 
)

Converts moves in a USI format string to a Kanji representation.

Parameters
commanda command string for gpsusi. ex. "ki2moves 7g7f 3c3d"
outa buffer to return a result string.
out_sizesize of the out buffer.
Returns
the actual size with which the buffer is filled. It does not include a null terminator.

Definition at line 89 of file c/facade.cc.

References osl::game_playing::UsiResponse::hasImmediateResponse(), and osl::eval::min().

int usiMovesToPositionString ( const char *  moves_str,
char *  out,
int  out_size 
)

Generates a Kanji position spcified by moves in a USI format string.

Parameters
moves_strUSI moves string.
outa buffer to return a result string.
out_sizesize of the out buffer.
Returns
the actual size with which the buffer is filled. It does not include a null terminator.

Definition at line 104 of file c/facade.cc.

References osl::eval::min(), moves, osl::record::KanjiPrint::print(), and osl::record::usi::strToMove().