-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathinterface.h
More file actions
83 lines (51 loc) · 2.44 KB
/
Copy pathinterface.h
File metadata and controls
83 lines (51 loc) · 2.44 KB
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
82
83
/* ***************************************************************************
* Sunsetter *
* (c) Ben Dean-Kawamura, Georg v. Zimmermann *
* For license terms, see the file COPYING that came with this program. *
* *
* Name: interface.h *
* Purpose: Has the data structures and function prototypes relating to the *
* user interface *
* *
* Comments: interface.h contatains prototypes, structures and global *
* variables for communication. See DESIGN for a description of the *
* what happens. *
* *
*************************************************************************** */
#ifndef _INTERFACE_
#define _INTERFACE_
#include "bughouse.h"
/* logFile is the file to log input and output if LOG is defined */
#ifdef LOG
extern FILE *logFile;
#endif
/* clientLogin is what the user sees when loging in. */
extern char *clientLogin;
#include "board.h"
extern int partner; /* If we have a partner in
client mode */
void output(const char *str); /* output() prints a string to the
approprate location */
void parseHolding(const char *str);
void parseOption(const char *str); /* parseOption() reads the input
that is given to Sunsetter
and handles it accordingly. */
int checkInput(); /* See's if input is waiting and
checks other things, like
flag falls */
void pollForInput(); /* it will
see if there is input waiting and
give it to xboardOption. */
void waitForInput(); /* Don't do anything until some kind
of input comes in */
void giveMove(move m);
void reportResult (gameResult res);
long getSysMilliSecs();
/* Functions for the partner communication */
int parsePartnerCommand(const char *arg1, const char *arg2);
/* Used when Sunsetters partner
ptells it something */
void givePartnerHelp(const char *str); /* Gives help about the
commands Sunsetter understands
from it's partner */
#endif