File: scoring.h

package info (click to toggle)
mah-jong 1.8-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 2,384 kB
  • ctags: 2,186
  • sloc: ansic: 26,312; perl: 393; makefile: 272; sh: 122
file content (39 lines) | stat: -rw-r--r-- 1,425 bytes parent folder | download | duplicates (4)
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
/* $Header: /home/jcb/newmj/RCS/scoring.h,v 11.0 2001/05/17 18:23:13 jcb Rel $
 * scoring.h
 * header file for scoring routines.
 */
/****************** COPYRIGHT STATEMENT **********************
 * This file is Copyright (c) 2000 by J. C. Bradfield.       *
 * Distribution and use is governed by the LICENCE file that *
 * accompanies this file.                                    *
 * The moral rights of the author are asserted.              *
 *                                                           *
 ***************** DISCLAIMER OF WARRANTY ********************
 * This code is not warranted fit for any purpose. See the   *
 * LICENCE file for further information.                     *
 *                                                           *
 *************************************************************/

#ifndef SCORING_H_INCLUDED
#define SCORING_H_INCLUDED 1

#include "game.h"

/* This structure is used to return score components.
   The value is either a number of points, or a number of doubles,
   as appropriate; the explanation is a human readable explanation
   of this score.
   The explanation must be copied before another scoring function
   is called.
*/
typedef struct _Score {
  int value;
  char *explanation;
} Score;

Score score_of_hand(Game *g, seats s);

/* this variable disables scoring for flowers and seasons */
extern int no_special_scores;

#endif /* SCORING_H_INCLUDED */