1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/*
DDS, a bridge double dummy solver.
Copyright (C) 2006-2014 by Bo Haglund /
2014-2018 by Bo Haglund & Soren Hein.
See LICENSE and README.
*/
#pragma once
#include <api/dll.h>
/**
* @brief Convert a PBN (Portable Bridge Notation) Deal string to DDS card array.
*
* Parses a PBN-format Deal string and fills the DDS card array with the remaining cards for each hand and suit.
*
* @param dealBuff PBN-format Deal string.
* @param remainCards Output array for remaining cards per hand and suit.
* @return 1 if successful, 0 otherwise.
*/
auto convert_from_pbn(
char const * dealBuff,
unsigned int remainCards[DDS_HANDS][DDS_SUITS]) -> int;
/**
* @brief Convert a PBN-format play trace to binary play trace.
*
* Converts a play trace from PBN format to the binary PlayTraceBin structure for analysis.
*
* @param playPBN Play trace in PBN format.
* @param playBin Output binary play trace structure.
* @return 1 if successful, 0 otherwise.
*/
auto convert_play_from_pbn(
const PlayTracePBN& playPBN,
PlayTraceBin& playBin) -> int;