diff options
author | Joursoir <chat@joursoir.net> | 2021-02-19 19:00:50 +0000 |
---|---|---|
committer | Joursoir <chat@joursoir.net> | 2021-02-19 19:00:50 +0000 |
commit | 42a235befbb4fc644ec806576211999a27ef1c6e (patch) | |
tree | 774908df1c4966c86b88cfea3e67dd7ee189cd0f /ai.hpp | |
parent | 0f2504aaa684d53bb30a6d3c152e35f9dfe6e47e (diff) | |
download | lp-gomoku-42a235befbb4fc644ec806576211999a27ef1c6e.tar.gz lp-gomoku-42a235befbb4fc644ec806576211999a27ef1c6e.tar.bz2 lp-gomoku-42a235befbb4fc644ec806576211999a27ef1c6e.zip |
add class artificial intelligence with functional
Diffstat (limited to 'ai.hpp')
-rw-r--r-- | ai.hpp | 19 |
1 files changed, 19 insertions, 0 deletions
@@ -0,0 +1,19 @@ +#ifndef LPG_AI_H +#define LPG_AI_H + +class GameField; + +class AI { + int max_depth; +public: + AI(int d); + + void GetFirstMove(int &my, int &mx, int rows, int cols); + void GetBestMove(int &my, int &mx, GameField field); +private: + int score(GameField field); + int min(GameField field, int depth); + int max(GameField field, int depth); +}; + +#endif /* LPG_AI_H */ |