~ubuntu-branches/ubuntu/warty/gnushogi/warty

« back to all changes in this revision

Viewing changes to gnushogi/eval.h

  • Committer: Bazaar Package Importer
  • Author(s): Javier Fernandez-Sanguino Pen~a
  • Date: 2004-01-09 16:06:59 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20040109160659-n26nu7009llm247p
Tags: 1.3-3.1
* NMU
 - Minimal testing done and looks quite OK (even if I don't know
   how to play the game...)
 - Build-Depends move from libxaw-dev to libxaw6-dev (Closes: #169975)
 - Included errno.h in gnushogi which makes the binary build properly
   now (and is usable with xshogi) (Closes: #226319)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * FILE: eval.h
 
3
 *
 
4
 *     Interface to the board evaluator.
 
5
 *
 
6
 * ----------------------------------------------------------------------
 
7
 * Copyright (c) 1993, 1994, 1995 Matthias Mutz
 
8
 * Copyright (c) 1999 Michael Vanier and the Free Software Foundation
 
9
 *
 
10
 * GNU SHOGI is based on GNU CHESS
 
11
 *
 
12
 * Copyright (c) 1988, 1989, 1990 John Stanback
 
13
 * Copyright (c) 1992 Free Software Foundation
 
14
 *
 
15
 * This file is part of GNU SHOGI.
 
16
 *
 
17
 * GNU Shogi is free software; you can redistribute it and/or modify it
 
18
 * under the terms of the GNU General Public License as published by the
 
19
 * Free Software Foundation; either version 1, or (at your option) any
 
20
 * later version.
 
21
 *
 
22
 * GNU Shogi is distributed in the hope that it will be useful, but WITHOUT
 
23
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 
24
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 
25
 * for more details.
 
26
 *
 
27
 * You should have received a copy of the GNU General Public License along
 
28
 * with GNU Shogi; see the file COPYING.  If not, write to the Free
 
29
 * Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
 
30
 * ----------------------------------------------------------------------
 
31
 *
 
32
 */
 
33
 
 
34
 
 
35
#ifndef _EVAL_H_
 
36
#define _EVAL_H_
 
37
 
 
38
#define NO_STAGES 100
 
39
#define NO_FEATURES 31
 
40
 
 
41
 
 
42
struct signature
 
43
{
 
44
    unsigned long hashbd;
 
45
    unsigned long hashkey;
 
46
};
 
47
 
 
48
#define MatchSignature(s) ((s.hashbd == hashbd) && (s.hashkey == hashkey))
 
49
#define CopySignature(s)  { s.hashbd = hashbd; s.hashkey = hashkey; }
 
50
 
 
51
typedef short        value_array[NO_STAGES][NO_PIECES];
 
52
typedef small_short fscore_array[NO_STAGES][NO_FEATURES][2];
 
53
 
 
54
extern value_array  *value;
 
55
extern fscore_array *fscore;
 
56
 
 
57
extern void threats (short side);
 
58
 
 
59
extern long attack[2][NO_SQUARES];
 
60
extern small_short sseed[NO_SQUARES];
 
61
 
 
62
extern struct signature threats_signature[2];
 
63
 
 
64
extern small_short starget[2][NO_SQUARES];
 
65
extern small_short sloose[NO_SQUARES];
 
66
extern small_short shole[NO_SQUARES];
 
67
extern small_short shung[NO_SQUARES];
 
68
 
 
69
extern struct signature squares_signature;
 
70
 
 
71
#endif /* _EVAL_H_ */