File: play.h

package info (click to toggle)
cgoban 1.9.14-18
  • links: PTS
  • area: main
  • in suites: bullseye, buster, sid, stretch
  • size: 3,448 kB
  • sloc: ansic: 36,037; sh: 707; makefile: 259
file content (81 lines) | stat: -rw-r--r-- 1,804 bytes parent folder | download | duplicates (12)
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
/*
 * src/gmp/play.h, part of Complete Goban (game program)
 * Copyright (C) 1995-1997 William Shubert.
 * See "configure.h.in" for more copyright information.
 */


#ifndef  _GMP_PLAY_H_

#ifndef  _SGF_H_
#include "../sgf.h"
#endif
#ifndef  _GOGAME_H_
#include "../goGame.h"
#endif
#ifndef  _GOPIC_H_
#include "../goPic.h"
#endif
#ifndef  _GOBAN_H_
#include "../goban.h"
#endif
#ifndef  _GMP_ENGINE_H_
#include "engine.h"
#endif
#define  _GMP_PLAY_H_  1


/**********************************************************************
 * Forward declarations
 **********************************************************************/
#ifndef  _ABUT_FSEL_H_
#ifndef  AbutFsel
#define  AbutFsel  void
#endif
#endif
#ifndef  _ABUT_MSG_H_
#ifndef  AbutMsg
#define  AbutMsg  void
#endif
#endif


/**********************************************************************
 * Data types
 **********************************************************************/

typedef struct GmpPlayInfo_struct  {
  int  in, out, pid;
  bool  ready;
  GmpEngine  *engine;
} GmpPlayInfo;


typedef struct GmpPlay_struct  {
  Cgoban  *cg;
  GmpPlayInfo  players[2];
  GoGame  *game;
  Goban  *goban;
  Sgf  *moves;
  SgfElem  *endGame;  /* Used to backtrack after a dispute. */
  SgfElem  *lastComment;
  AbutFsel  *fsel;

  MAGIC_STRUCT
} GmpPlay;


/**********************************************************************
 * Functions
 **********************************************************************/
extern GmpPlay  *gmpPlay_create(Cgoban *cg,
				int inFiles[2], int outFiles[2],
				int pids[2], GoRules rules,
				int size, int hcap, float komi,
				const char *white, const char *black,
				GoTimeType timeType, int mainTime,
				int byTime, int auxTime);
extern void  gmpPlay_destroy(GmpPlay *l);


#endif  /* _GMP_PLAY_H_ */