1 /* aiplayer.h 2 ** 3 ** code for positioning artifitial intelligence player 4 ** Copyright (C) 2001 Florian Berger 5 ** Email: harpin_floh@yahoo.de, florian.berger@jk.uni-linz.ac.at 6 ** 7 ** This program is free software; you can redistribute it and/or modify 8 ** it under the terms of the GNU General Public License Version 2 as 9 ** published by the Free Software Foundation; 10 ** 11 ** This program is distributed in the hope that it will be useful, 12 ** but WITHOUT ANY WARRANTY; without even the implied warranty of 13 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 ** GNU General Public License for more details. 15 ** 16 ** You should have received a copy of the GNU General Public License 17 ** along with this program; if not, write to the Free Software 18 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 ** 20 */ 21 #ifndef AIPLAYER_H 22 #define AIPLAYER_H 23 24 #include "billard.h" 25 #include "player.h" 26 27 #ifndef AIPLAYER_C 28 extern VMvect (*ai_get_stroke_dir)( BallsType * balls, BordersType * walls, struct Player * pplayer ); 29 #endif 30 31 VMfloat stroke_angle( BallType * bcue, BallType * bhit, HoleType * hole ); 32 int ball_in_way( int ballnr, VMvect aim, BallsType * balls ); 33 void ai_set_skill( double skill ); 34 void ai_set_err( double err ); 35 VMvect ai_get_stroke_dir_8ball ( BallsType * balls, BordersType * walls, struct Player * pplayer ); 36 VMvect ai_get_stroke_dir_9ball ( BallsType * balls, BordersType * walls, struct Player * pplayer ); 37 VMvect ai_get_stroke_dir_carambol( BallsType * balls, BordersType * walls, struct Player * pplayer ); 38 VMvect ai_get_stroke_dir_snooker ( BallsType * balls, BordersType * walls, struct Player * pplayer ); 39 40 void setfunc_ai_get_stroke_dir(VMvect (*func)( BallsType * balls, BordersType * walls, struct Player * pplayer )); 41 42 #endif /* AIPLAYER_H */ 43