Dumb but not dumber IA
This commit is contained in:
parent
033a436be2
commit
87e7ff5829
7 changed files with 145 additions and 34 deletions
17
include/ia.h
Normal file
17
include/ia.h
Normal file
|
@ -0,0 +1,17 @@
|
|||
#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
|
Loading…
Add table
Add a link
Reference in a new issue