File: ddsInterface.h

package info (click to toggle)
deal 3.1.9-12
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 1,552 kB
  • sloc: ansic: 5,224; cpp: 4,186; tcl: 3,125; makefile: 200; sh: 10
file content (65 lines) | stat: -rw-r--r-- 1,114 bytes parent folder | download | duplicates (6)
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
/*
 * Broken out from dds.h
 * This file is the essential external "C" face to the dds.cpp file
 */
#ifndef __DDSINTERFACE_H__
#define __DDSINTERFACE_H__

#if 0
#define BENCH
#endif

#if defined(_WIN32)
#    define DLLEXPORT __declspec(dllexport)
#    define STDCALL __stdcall
#else
#if !defined(DLLEXPORT)
#    define DLLEXPORT
#endif
#    define STDCALL
#    define INT8 char
#endif

#ifdef __cplusplus
#    define EXTERN_C extern "C"
#else
#    define EXTERN_C
#endif

typedef unsigned short int holding_t;


struct diagram {
   holding_t cards[4][4];
};

struct deal {
  int trump;
  int first;
  int currentTrickSuit[3];
  int currentTrickRank[3];
  struct diagram remaining;
};

struct futureTricks {
  int nodes;
#ifdef BENCH
  int totalNodes;
#endif
  int cards;
  int suit[13];
  int rank[13];
  int equals[13];
  int score[13];
};

#include <string.h>

EXTERN_C int SolveBoard(struct deal dl, 
  int target, int solutions, int mode, struct futureTricks *futp);

EXTERN_C void DDSInitStart();

EXTERN_C holding_t distinctUnplayedCards(holding_t origHolding, holding_t played,holding_t *sequence);
#endif