Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
include
osl
game_playing
threadForEachMove.h
Go to the documentation of this file.
1
/* threadForEachMove.h
2
*/
3
#ifndef OSL_THREADFOREACHMOVE_H
4
#define OSL_THREADFOREACHMOVE_H
5
6
#include "
osl/game_playing/computerPlayer.h
"
7
#include "
osl/game_playing/speculativeModel.h
"
8
#include <boost/shared_ptr.hpp>
9
#include <boost/scoped_ptr.hpp>
10
11
namespace
osl
12
{
13
namespace
game_playing
14
{
15
class
SearchPlayer;
19
class
ThreadForEachMove
:
public
SpeculativeModel
20
{
21
struct
SpeculativeThread;
22
boost::scoped_ptr<SpeculativeThread>
speculative_thread0
;
23
boost::scoped_ptr<SpeculativeThread>
speculative_thread1
;
24
int
max_threads
;
25
public
:
26
explicit
ThreadForEachMove
(
int
max_threads
=1);
27
~ThreadForEachMove
();
28
29
void
setMaxThreads
(
int
new_max_threads)
30
{
31
max_threads
= new_max_threads;
32
}
33
void
startSpeculative
(
const
boost::shared_ptr<GameState> state,
34
const
SearchPlayer
& main_player);
35
void
stopOtherThan
(
Move
);
36
void
stopAll
();
37
38
const
MoveWithComment
waitResult
(
Move
last_move,
int
wait_for,
39
SearchPlayer
& main_player,
int
);
40
41
void
selectBestMoveCleanUp
();
42
};
43
}
// game_playing
44
}
// osl
45
46
#endif
/* OSL_THREADFOREACHMOVE_H */
47
// ;;; Local Variables:
48
// ;;; mode:c++
49
// ;;; c-basic-offset:2
50
// ;;; End:
Generated on Sun Jul 21 2013 13:37:27 by
1.8.4