Final Commit
[progcomp2013.git] / agents / silverfish / silverfish.h
1 #ifndef _SILVERFISH_H
2 #define _SILVERFISH_H
3
4 #include "agent.h"
5
6 class Silver : public Agent
7 {
8         public:
9                 Silver(const std::string & colour, int max_depth=2;);
10                 Silver(const std::string & colour, const std::map<Piece::Type, double> & new_values, int max_depth=2;);
11                 virtual ~Silver() {}
12                 
13                 virtual Square & Select();
14                 virtual Square & Move();
15                 
16                 std::map<Piece::Type, double> values;
17                 int max_depth;
18                 int depth;
19                 
20 };
21
22 class Move
23 {
24         public:
25                 Move(Piece * new_p, Square & new_s, double new_score) : p(new_p), s(new_s), score(new_score) {}
26                 virtual ~Move() {}
27                 Move(const Move & cpy) : p(cpy.p), s(cpy.s), score(cpy.score) {}
28                 
29                 Piece * p;
30                 Square & s;
31                 double score;
32                 
33                 bool operator>(const Move & m) const {return score > m.score;}
34                 bool operator<(const Move & m) const {return score < m.score;}
35 };
36
37
38 #endif //_SILVERFISH_H

UCC git Repository :: git.ucc.asn.au