Sample code - set CC
'---VB.Net code example to set CC:
Const C_NORTH As Integer = 0
Const C_EAST As Integer = 1
Const C_SOUTH As Integer = 2
Const C_WEST As Integer = 3
Const C_NS As Integer = 0
Const C_WE As Integer = 1
Const T_21GF As Integer = 0
Const T_SAYC As Integer = 1
Const T_WJ As Integer = 2
Const T_PC As Integer = 3
Dim position As Integer
Dim int_j As Integer
Dim int_any As Integer
Dim int_system As Integer
Dim int_site As Integer
Dim str_system_name As String
Dim str_convention_name As String
Dim b_value As Boolean
Set systems to all players 0-3 on both sites:
Player(C_NORTH).system_type(C_NS) = T_WJ
Player(C_NORTH).system_type(C_WE) = T_21GF
Player(C_SOUTH).system_type(C_NS) = T_WJ
Player(C_SOUTH).system_type(C_WE) = T_21GF
Player(C_EAST).system_type(C_WE) = T_21GF
Player(C_EAST).system_type(C_NS) = T_WJ
Player(C_WEST).system_type(C_WE) = T_21GF
Player(C_WEST).system_type(C_NS) = T_WJ
Verification:
int_system = Player(position).system_type(C_NS)
To get a str_system_name:
str_system_name = Player(int_any).system_name(int_system)
Note, changing the system affects some conventions specific to the selected system.
The correct order is:
System selection.
Convention setting.
Set conventions to all players 0-3 on both sites:
Player(position).conventions(int_site, str_convention) = b_value
examples:
Player(C_NORTH).conventions(C_NS, "12") = True
or
Player(C_NORTH).conventions(C_NS, "Cue bid") = True
If there is no defined convention, the default value are loaded.
Verification:
b_value = Player(position).conventions(int_system, str_convention)
where a str_convention may be: a str_convention_number or a str_convention_name.
Note, a str_convention_number may differ depending on the DLL version.
You can scan the names of all conventions (0 to 255) to get a str_convention_name:
str_convention_name = Player(int_any).get_convention_name(int_j)