File: ai_tools.h

package info (click to toggle)
lgeneral 1.2.3%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 7,312 kB
  • ctags: 3,311
  • sloc: ansic: 29,061; sh: 3,574; makefile: 375; sed: 93
file content (36 lines) | stat: -rw-r--r-- 1,609 bytes parent folder | download | duplicates (5)
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
/***************************************************************************
                          ai_tools.h  -  description
                             -------------------
    begin                : Sat Oct 5 2002
    copyright            : (C) 2001 by Michael Speck
    email                : kulkanie@gmx.net
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/

#ifndef __AI_TOOLS_H
#define __AI_TOOLS_H

#define AI_DEBUG( loglev, ... ) \
	do { if (loglev <= config.ai_debug) printf(__VA_ARGS__); } while (0)

/*
====================================================================
Check the surrounding of a tile and apply the eval function to
it. Results may be stored in the context.
If 'eval_func' returns False the evaluation is broken up.
====================================================================
*/
typedef struct {
    int x, y;
} AI_Pos;
void ai_eval_hexes( int x, int y, int range, int(*eval_func)(int,int,void*), void *ctx );

#endif