u_ttt/include/ia.h
2021-10-24 23:22:43 +02:00

17 lines
641 B
C

#ifndef IA_H
#define IA_H
#include "common.h"
#include "model.h"
/*!
* This function modify the move in parameter in order to get a valid move (1) randomly if tactic is 0 or
* (2) in a clever way if tactic is 1 in the corresponding utictactoe u.
*
* \param p_uttt a pointer on a s_utictactoe.
* \param p_move a pointer on a s_move to be modified.
* \param tactic an e_tactic set to 0 for random strategy and 1 for clever one.
*/
void best_move(s_utictactoe* p_uttt, s_move* p_move, e_tactic tactic);
s_tictactoe * clone_ttt( s_tictactoe * p_ttt );
e_location get_best_random_position( s_tictactoe * p_uttt, e_player player);
#endif