#include "osl/container/moveVector.h"
#include "osl/record/csaRecord.h"
#include "osl/record/checkDuplicate.h"
#include <boost/algorithm/string/trim.hpp>
#include <boost/functional/hash.hpp>
#include "boost/foreach.hpp"
#include "boost/format.hpp"
#include "boost/multi_array.hpp"
#include <boost/program_options.hpp>
#include <fstream>
#include <iostream>
#include <vector>
型定義 | |
typedef osl::stl::hash_map < std::string, unsigned int, boost::hash< std::string > > | players_t |
typedef boost::multi_array < unsigned int, 4 > | array_t |
列挙型 | |
enum | GameResult { BLACK_WIN = 0, WHITE_WIN, OTHERS, BLACK_WIN = 0, WHITE_WIN, OTHERS } |
関数 | |
array_t | winloss (boost::extents[MAX_PLAYERS][MAX_PLAYERS][2][3]) |
const std::string & | getPlayerName (const unsigned int id) |
unsigned int | setPlayer (const std::string &player) |
void | increment (unsigned int black, unsigned int white, GameResult gr) |
GameResult | getGameResult (const std::string &csa_file, const osl::vector< osl::Move > &moves) |
void | readFile (const std::string &csa_file, osl::record::CheckDuplicate &duplicates) |
void | printTotal (std::ostream &out) |
void | printResult (std::ostream &out) |
int | main (int argc, char **argv) |
変数 | |
static const unsigned int | MAX_PLAYERS = 20 |
< max players | |
static players_t | players |
player_a, player_b, a's black 0 or white 1, [wins, losses, others] |
typedef boost::multi_array<unsigned int, 4> array_t |
count-win-loss.cc の 23 行で定義されています。
typedef osl::stl::hash_map<std::string, unsigned int, boost::hash<std::string> > players_t |
count-win-loss.cc の 19 行で定義されています。
enum GameResult |
count-win-loss.cc の 26 行で定義されています。
GameResult getGameResult | ( | const std::string & | csa_file, | |
const osl::vector< osl::Move > & | moves | |||
) |
const std::string& getPlayerName | ( | const unsigned int | id | ) |
count-win-loss.cc の 33 行で定義されています。
参照元 printResult(), と printTotal().
void increment | ( | unsigned int | black, | |
unsigned int | white, | |||
GameResult | gr | |||
) |
int main | ( | int | argc, | |
char ** | argv | |||
) |
count-win-loss.cc の 205 行で定義されています。
参照先 check_duplicate, files, kisen_filename, osl::record::CheckDuplicate::print(), printResult(), printTotal(), readFile(), run(), store(), と vm.
void printResult | ( | std::ostream & | out | ) |
void printTotal | ( | std::ostream & | out | ) |
void readFile | ( | const std::string & | csa_file, | |
osl::record::CheckDuplicate & | duplicates | |||
) |
unsigned int setPlayer | ( | const std::string & | player | ) |
array_t winloss | ( | boost::extents | [MAX_PLAYERS][MAX_PLAYERS][2][3] | ) |
参照元 increment(), printResult(), と printTotal().
const unsigned int MAX_PLAYERS = 20 [static] |
player_a, player_b, a's black 0 or white 1, [wins, losses, others]
count-win-loss.cc の 22 行で定義されています。