Added promptChallenge function for view and end user.
[NALCG.git] / src / enduser.h
blobcd78934c46e6ce2fdd80c5d5faa0799da209aece
1 #ifndef _NALCG_ENDUSER_H_
2 #define _NALCG_ENDUSER_H_
4 #include "logic/board.h"
6 class Middleman;
7 class EndUser
9 public:
10 EndUser() : mMiddleman(0) { };
11 virtual ~EndUser() { }
13 // Note: Do not use board as a member variable as it can change and be deleted.
14 // It's not safe to use it after these function calls have returned.
15 virtual void init(const Board* board, Middleman* middleman) { mMiddleman = middleman; }
16 virtual void setBoard(const Board* board, unsigned int round) = 0;
18 virtual void move(int fromX, int fromY, int toX, int toY,
19 bool continuous = false) = 0;
20 virtual void promoteMove(int fromX, int fromY, int toX, int toY,
21 unsigned int promoteTo) = 0;
22 virtual void setControl(bool white, bool black) = 0;
23 virtual Middleman* getMiddleman() const { return mMiddleman; }
24 virtual void promptChallenge(const std::string& challengerName) = 0;
25 protected:
26 Middleman* mMiddleman;
29 #endif // _NALCG_ENDUSER_H_